How to edit ? -
StR_MaRy - 21.11.2014
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}Foloseste{FFFFFF}: /setskin [playerid/PartOfName] [skin id]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
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]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}[Server-In-Lucru RPG]: {FFFFFF}Nu esti autorizat sa folosesti aceasta Comanda.");
}
}
return 1;
}
hello, how can I do this command to use it on you, not on the other player , /setskin [id] [skin id] i want only to use /setskin [skin id] and give me that skin only me not for other players like /setskin marian 29
Re : How to edit ? -
Dutheil - 21.11.2014
https://sampforum.blast.hk/showthread.php?tid=547168
Re: How to edit ? -
StR_MaRy - 21.11.2014
and how can i do it without cmd ? and with /setskin ?
Re: How to edit ? -
StR_MaRy - 21.11.2014
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068
: error 029: invalid expression, assumed zero
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068
: error 017: undefined symbol "cmd_skin"
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068
: error 029: invalid expression, assumed zero
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068
: fatal error 107: too many error messages on one line
the line is: CMD
kin(playerid, params[])
Re: How to edit ? -
Jefff - 21.11.2014
pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 4) SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}[Server-In-Lucru RPG]: {FFFFFF}Nu esti autorizat sa folosesti aceasta Comanda.");
else{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}Foloseste{FFFFFF}: /setskin [skin id]");
new skin = strval(tmp);
// IsValidSkin here
SetPlayerSkin(playerid, skin);
}
return 1;
}