09.05.2012, 15:26
Hello guys. I have a problem.
With this command i will make a cow. Not a jetpack, i will make a cow, but who ?
/cow [ID] and you are a cow.
pawn Код:
if(strcmp(cmd, "/cow, true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /cow [ID/DioImena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_USEJETPACK); // Change playerid to giveplayerid
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
/cow [ID] and you are a cow.