07.01.2013, 12:50
pawn Код:
if (strcmp("/rainbowcar", cmdtext, true, 14) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle.");
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You dont have enough money");
SendClientMessage(playerid, COLOR_RED, "You Spend Now 10,000$ On Rainbowcar, Enjoy.w ")
KillTimer(CTimer2);
KillTimer(CTimer3);
KillTimer(CTimer4);
KillTimer(CTimer5);
KillTimer(CTimer6);
KillTimer(CTimer7);
KillTimer(CTimer8);
KillTimer(CTimer9);
KillTimer(CTimer10);
KillTimer(CTimer11);
CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
GivePlayerMoney(playerid,- 10000);
return 1;
}
pawn Код:
if(!strcmp(cmdtext,"/nos",true))
{
if(NosOnByAdmin == 0) return SendClientMessage(playerid, 0xFF0000FF, "האדמין לא הפעיל את אפשרות הנייטרוס, מצטערים.");
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You dont have enough money");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle! - אתה לא בתוף רכב!"); // If the player is not in vehicle...
if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid),GetVehicleComponentType(1010)) != 1010) // Check if the vehicle has no nitro
{
GivePlayerMoney(playerid, -10000);
AddVehicleComponent(GetPlayerVehicleID(playerid),1010); // Adding nitro
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); // Sound of vehicle improving
SendClientMessage(playerid, 0xFF0000FF, "You add nitro to your car ! - הוספת נייטרוס לרכבך בהצלחה !");
}
return 1;
}