20.02.2011, 12:45
Hey , how i can make this 2 commands with zcmd+sscanf ? i've tryed but didn't work
and
Код:
if(strcmp(cmd, "/getvip", true) == 0) { new vippp; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xF60000AA, "Use /getvip [id]."); vippp = strval(tmp); if(IsPlayerConnected(vippp)) { GetPlayerVip(vippp); SendClientMessage(playerid, 0xF60000AA, "He is not a vip anymore"); SendClientMessage(vippp, 0xF60000AA, "You are not a vip anymore"); return 1; } else { SendClientMessage(playerid, COLOR_RED, "player off :("); return 1; } }
Код:
if(strcmp(cmd, "/setvip", true) == 0) { new vippp; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xF60000AA, "Use /setvip [id]."); vippp = strval(tmp); if(IsPlayerConnected(vippp)) { SetPlayerVip(vippp); SendClientMessage(playerid, 0xF60000AA, "Player set as vip"); SendClientMessage(vippp, 0xF60000AA, "You are now vip"); return 1; } else { SendClientMessage(playerid, COLOR_RED, "player off :("); return 1; } }