14.08.2011, 15:12
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 && !strcmp(tmp,"mp3"))
{
SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
PlayerData[playerid][MP3] = 0;
PlayerData[playerid][illegaljob] = 1;
GivePlayerMoney(playerid, 200);
SendClientMessage(playerid, YELLOW, " You have sold to the black market a credit card for 200$ American Dollars.");
return 1;
}
if(PlayerData[playerid][Cellphone] == 1 && strcmp(tmp,"cellphone",true) == 0)
{
PlayerData[playerid][Cellphone] = 0;
PlayerData[playerid][illegaljob] = 1;
SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
GivePlayerMoney(playerid, 250);
SendClientMessage(playerid, YELLOW, " You have sold to the black market a credit card for 250$ American Dollars.");
return 1;
}
if(PlayerData[playerid][Wallet] == 1 && !strcmp(tmp,"wallet"))
{
SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
PlayerData[playerid][Wallet] = 0;
PlayerData[playerid][illegaljob] = 1;
GivePlayerMoney(playerid, 400);
SendClientMessage(playerid, YELLOW, " You have sold to the black market a credit card for 400$ American Dollars.");
return 1;
}
if(PlayerData[playerid][Creditcard] == 1 && !strcmp(tmp,"Creditcard"))
{
SetTimer("illegaljob", 1000*1200, false); // Set a timer of 1000 miliseconds (1 second)
PlayerData[playerid][Creditcard] = 0;
PlayerData[playerid][illegaljob] = 1;
GivePlayerMoney(playerid, 400);
SendClientMessage(playerid, YELLOW, " You have sold to the black market a credit card for 400$ American Dollars.");
return 1;
}
else
{
SendClientMessage(playerid, RED, " You didn't type a right item-name or you don't have that item.");
}
return 1;
}
}
}
ALWAYS.