Commands
#1

Hey , how i can make this 2 commands with zcmd+sscanf ? i've tryed but didn't work

Код:
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;
    }
}
and
Код:
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;
    }
}
Reply


Messages In This Thread
Commands - by Rock18 - 20.02.2011, 12:45
Re: Commands - by MadeMan - 20.02.2011, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)