20.11.2014, 23:47
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;
}
{
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;
}