Wie mache ich es das der Skin beim Drücken von "Enter" Gespeichert wird ?
Code
if(IsPlayerInRangeOfPoint(playerid,10.0,437.8960,-1751.5983,8.8861))
{
if(newkeys == KEY_JUMP) //Shift
{
if(GetPlayerSkin(playerid) == 26)
{
SetPlayerSkin(playerid, 18);
}
else
{
SetPlayerSkin(playerid, GetPlayerSkin(playerid) + 1);
}
//Nächster Skin
}
if(newkeys == KEY_WALK) //Alt
{
if(GetPlayerSkin(playerid) == 18)
{
SetPlayerSkin(playerid, 26);
}
else
{
SetPlayerSkin(playerid, GetPlayerSkin(playerid) - 1);
}
//Vorheriger Skin
}
if(newkeys == KEY_SECONDARY_ATTACK) //Enter
{
SpawnPlayer(playerid);
//Skin Auswahl Beenden (Skin Annehmen)
}
if(newkeys == KEY_SPRINT) //Space
{
//Skin Auswahl abbrechen
}
}
// Vieleicht hilft das ja weiter Script ist nen Godfather
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Hilfe : /setskin [playerid/PartOfName] [skin model]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strvalEx(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2000)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new name[20];
new victim[20];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(playa, victim, sizeof(victim));
PlayerInfo[playa][pModel] = health;
PlayerInfo[playa][pChar] = health;
SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
format(string, 256, "AdmWarning: [%s] Skin was just set to %d by %s!",victim,health,name);
ABroadCast(COLOR_YELLOW,string,1347);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen CMD nicht nutzen,schäm dich!");
}
}
return 1;
}
Alles anzeigen