14.11.2010, 14:08
(
Последний раз редактировалось Equilibrium; 14.11.2010 в 19:44.
)
Here is mate mine script i really dont know what is problem :S
Please can someone help me ?
Код:
new:Checkpoint1; TextDrawOr[playerid]= TextDrawCreate(15.000000, 170.000000, "~n~~r~Oruzja:~n~~n~~y~1.~w~|Ak-47 ~g~$3500|~n~~y~2.~w~|Desert ~g~$800|~n~~y~3.~w~|Sawnoff ~g~$2600|~n~~y~4.~w~|Combat ~g~$3600|~n~~y~5.~w~|Tec9 ~g~$1900|~n~~y~6.~w~|MP5 ~g~$900|~n~~y~7.~w~|M4 ~g~$3500|~n~~y~8.~w~|Sniper ~g~$4200|~n~~y~9.~w~|Pancirf ~g~$1000|~n~"); TextDrawFont(TextDrawOr[playerid], 1); TextDrawTextSize(TextDrawOr[playerid],145.000000, 260.000000); TextDrawLetterSize(TextDrawOr[playerid],0.299999,0.800000); TextDrawFont(TextDrawOr[playerid],1); TextDrawUseBox(TextDrawOr[playerid], 1); TextDrawBoxColor(TextDrawOr[playerid], 0x000000FF); On Cellback OnPlayerEnterDynamicCP if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { if(checkpointid == Checkpoint1) // This is what the checkpoint will do { TextDrawShowForPlayer(playerid, TextDrawOr[playerid]); // Funtion, in this case the checkpoint only will show the TextDraw } { Cellback OnPlayerText if(text[0] == '1') // Chainsaw if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-3500); // The Weapon Cost SafeGivePlayerWeapon(playerid,30,200); return 0; } if(text[0] == '2') //Desert Eagle if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <800) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-800); // The Weapon Cost SafeGivePlayerWeapon(playerid,24,150); return 0; } if(text[0] == '3') //Sawnoff Shotgun if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <2600) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-2600); // The Weapon Cost SafeGivePlayerWeapon(playerid,26,150); return 0; } if(text[0] == '4') //Combat Shotgun if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <3600) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-3600); // The Weapon Cost SafeGivePlayerWeapon(playerid,27,150); return 0; } if(text[0] == '5') //Tec9 if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <1900) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-1900); // The Weapon Cost SafeGivePlayerWeapon(playerid,32,200); return 0; } if(text[0] == '6') //MP5 if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <900) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-900); // The Weapon Cost SafeGivePlayerWeapon(playerid,29,200); return 0; } if(text[0] == '7') //M4 if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-3500); // The Weapon Cost SafeGivePlayerWeapon(playerid,31,250); return 0; } if(text[0] == '8') //Sniper if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <4200) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-4200); // The Weapon Cost SafeGivePlayerWeapon(playerid,34,100); return 0; } if(text[0] == '9') //Armor if(IsPlayerInDynamicCP(playerid, Checkpoint1)) // This will work, only if you are in the checkpoint { if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid,COLOR_RED, "Nemas Dovoljno Novca"); // if you do not have the specific money, it will say the "you dont have enough money" SafeGivePlayerMoney(playerid,-1000); // The Weapon Cost SetPlayerArmour(playerid,100); return 0; }