04.12.2012, 15:07
queria tranformar esse cmd para strcmp, o sistema foi encontrado aq na forum samp msm postado por [NRG]Dark
Tentativas ~
Tentativa Fail ._.
pawn Код:
CMD:chapeu(playerid, params[]) {
if(Chapeu[playerid]==0){
SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0);
Chapeu[playerid] = 1;
SendClientMessage(playerid,-1,"On");
}else{
RemovePlayerAttachedObject(playerid,1);
SendClientMessage(playerid,-1,"Off");
}
return 1;
}
pawn Код:
if(strcmp(cmdtext,"/Chapeu", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(Chapeu[playerid]==0)
{
SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0);
Chapeu[playerid] = 1;
SendClientMessage(playerid,-1,"On");
}
else
{
RemovePlayerAttachedObject(playerid,1);
SendClientMessage(playerid,-1,"Off");
}
return 1;
}