#1

I want to know what's wrong with this command, when i type /sell and any of the options which is mp3, wallet, cellphone and creditcard it says unknown command

I know this is the problem :

}
SendClientMessage(playerid,RED, "You don't have a MP3.");

}
SendClientMessage(playerid,RED, "You don't have a Cellphone.");
}
SendClientMessage(playerid,RED, "You don't have a Wallet.");
}
SendClientMessage(playerid,RED, "You don't have a Credit-card.");
}
}

But what is the correct formula ?


pawn Код:
if(strcmp(cmd,"/sell",true)==0)
    {
    if(!IsPlayerInRangeOfPoint(playerid, 1.5 , 2379.1194,-655.6750,127.8510)) return SendClientMessage(playerid,RED, " You are not at the black market. ");
    {
    if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /sell [wallet/cellphone/creditcard/mp3]");
    {
    if(PlayerData[playerid][MP3] == 1)
    {
    if(!strcmp(tmp,"mp3"))
    {
        SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
        PlayerData[playerid][MP3] = 0;
        GivePlayerMoney(playerid, 200);
        SendClientMessage(playerid, YELLOW, " You have sold the black market a credit card for 200$ American Dollars");
        return 1;
        }
    if(PlayerData[playerid][Cellphone] == 1)
    {
    if(!strcmp(tmp,"cellphone"))
        {
        PlayerData[playerid][Cellphone] = 0;
        SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
        GivePlayerMoney(playerid, 250);
        SendClientMessage(playerid, YELLOW, " You have sold the black market a credit card for 250$ American Dollars");
        return 1;
        }
    if(PlayerData[playerid][Wallet] == 1)
    {
    if(!strcmp(tmp,"wallet"))
        {
        SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
        PlayerData[playerid][Wallet] = 0;
        GivePlayerMoney(playerid, 400);
        SendClientMessage(playerid, YELLOW, " You have sold the black market a credit card for 400$ American Dollars");
        return 1;
        }
    if(PlayerData[playerid][Creditcard] == 1)
    {
    if(!strcmp(tmp,"Creditcard"))
        {
        SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
        PlayerData[playerid][Creditcard] = 0;
        GivePlayerMoney(playerid, 400);
        SendClientMessage(playerid, YELLOW, " You have sold the black market a credit card for 400$ American Dollars");
        return 1;
        }
        else
        {
        SendClientMessage(playerid, RED, " You didn't type a right item-name.");
        }
    return 1;
    }
 }
    SendClientMessage(playerid,RED, "You don't have a MP3.");
   
 }
    SendClientMessage(playerid,RED, "You don't have a Cellphone.");
 }
    SendClientMessage(playerid,RED, "You don't have a Wallet.");
 }
    SendClientMessage(playerid,RED, "You don't have a Credit-card.");
 }
 }
Reply


Messages In This Thread
help - by stix - 13.07.2011, 02:54
Re: help - by Godhimself - 13.07.2011, 02:57
Re: help - by PrawkC - 13.07.2011, 03:00
Re: help - by stix - 13.07.2011, 04:34
Re: help - by stix - 13.07.2011, 18:58

Forum Jump:


Users browsing this thread: 3 Guest(s)