CMD:setskin(playerid, params[])
{
new skin, skinid, pname[MAX_PLAYER_NAME], string[128];
skinid = GetPlayerSkin(playerid);
if(sscanf(params,"i", skin)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setskin <0 - 299>");
if(skin > 299 || skin < 0) return SendClientMessage(playerid,COLOR_RED,"Invalid Skin ID! <0 - 299>");
GetPlayerName(playerid, pname,sizeof(pname));
format(string, sizeof(string),"%s has changed skin model to %i", pname,skin);
SendClientMessageToAll(COLOR_GREEN,string);
format(string, sizeof(string),"Your skin have been set to %d", skin);
SendClientMessage(playerid,COLOR_GREEN, string);
if(skin == skinid) return SendClientMessage(playerid,COLOR_RED,"You already using that skin model");
SetPlayerSkin(playerid, skin);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
ApplyAnimation(playerid,"DANCING","dnce_M_a",3.1,0,0,0,0,1);
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 10.0);
SetPlayerFacingAngle(playerid, 65.6557);
SetPlayerPos(playerid,-248.4268,1362.1091,68.7860);
SetPlayerCameraPos(playerid, -255.2794,1365.9083,73.2267);
SetPlayerCameraLookAt(playerid, -248.4268,1362.1091,68.7860);
return 1;
}
CMD:setskin(playerid, params[])
{
new skin, skinid, pname[MAX_PLAYER_NAME], string[128],string2[128];
skinid = GetPlayerSkin(playerid);
if(sscanf(params,"i", skin)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setskin <0 - 299>");
if(skin > 299 || skin < 0) return SendClientMessage(playerid,COLOR_RED,"Invalid Skin ID! <0 - 299>");
GetPlayerName(playerid, pname,sizeof(pname));
format(string, sizeof(string),"%s has changed skin model to %i", pname,skin);
SendClientMessageToAll(COLOR_GREEN,string);
format(string2, sizeof(string2),"Your skin have been set to %d", skin);
SendClientMessage(playerid,COLOR_GREEN, string2);
if(skin == skinid) return SendClientMessage(playerid,COLOR_RED,"You already using that skin model");
SetPlayerSkin(playerid, skin);
return 1;
}
CMD:setskin(playerid, params[])
{
new skin, skinid, pname[MAX_PLAYER_NAME], string[128];
skinid = GetPlayerSkin(playerid);
if(sscanf(params,"i", skin)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setskin <0 - 299>");
if(skin == skinid) return SendClientMessage(playerid,COLOR_RED,"You already using that skin model");
if(skin > 299 || skin < 0) return SendClientMessage(playerid,COLOR_RED,"Invalid Skin ID! <0 - 299>");
GetPlayerName(playerid, pname,sizeof(pname));
format(string, sizeof(string),"%s has changed skin model to %i", pname,skin);
SendClientMessageToAll(COLOR_GREEN,string);
format(string, sizeof(string),"Your skin have been set to %d", skin);
SendClientMessage(playerid,COLOR_GREEN, string);
SetPlayerSkin(playerid, skin);
return 1;
}
thanks it work now i want that player counting i need it for my stunt server script
|
#define for2(MAX_PLAYERS,%1) for(new %1=0;%1<MAX_PLAYERS;%1++) if(IsPlayerConnected(%1))
if (strcmp("/players", cmdtext, true, 10) == 0)
{
new
string[156],
counter
;
for2(MAX_PLAYERS,i) counter++;
format(string, sizeof(string), "%d", counter);
SendClientMessage(playerid, -1, string);
return 1;
}