28.02.2013, 19:04
I need help with my pns command, i wanted to make the command that when a player is near the pay n spray and typer /paranda (/repair in english) then his vehicle teleports in to the PNS freezes for a time amount and then teleports out and takes his money, but when i try the command all the stuff like you arent near it and arent in a vehicle and no money works but the command itself doesnt do anything, no freezing no nothing. Really need help.
Command:
Command:
Код:
CMD:paranda(playerid, params[]) { new PlayerState = GetPlayerState(playerid); if(IsPlayerInRangeOfPoint(playerid, 7.0, 2075.6091,-1831.4385,13.5545)) { if (PlayerState == PLAYER_STATE_PASSENGER || PlayerState == PLAYER_STATE_ONFOOT) { SendClientMessage(playerid, COLOR_RED, "Sa ei saa parandusse siseneda jala/kхrvalistujana!"); return 1; } else if(PlayerState == PLAYER_STATE_DRIVER) { if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid,COLOR_RED, "Sul ei ole piisavalt raha masina parandamiseks! [3500 krooni]"); if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(playerid, 2065.4656,-1831.3871,13.3786); } else { SetPlayerPos(playerid, 2065.4656,-1831.3871,13.3786); TogglePlayerControllable(playerid, 0); SetTimerEx("PNSfreeze", 5000, false, "i", playerid); GivePlayerMoney(playerid,-3500); return 1; } } } return 1; } forward PNSfreeze(playerid); public PNSfreeze(playerid) { TogglePlayerControllable(playerid, 1); SetVehiclePos(playerid, 2105.3506,-1775.3052,13.3918); return 1; }