19.05.2011, 16:37
I made my robbery system (SF shopss) and this is the countdown but i have a problem:
When it gets to Stay in the marker for 1 seconds to complete the robbery,the server restarts,what's wrong?(maybe with the position is something worng)
pawn Код:
public CountDown(playerid)
{
new string[128];
format(string, sizeof(string), " Stay in the marker for %d seconds to complete the robbery", countn);
GameTextForPlayer(playerid,string,10000,4);
countn--;
if(countn <= -1)
{
KillTimer(counttimer);
GivePlayerMoney(playerid,2000);
SetPlayerWantedLevel(playerid,4);
new Float:x,Float:y,Float:z;
new pos=GetPlayerPos(playerid,x,y,z);
if(pos == wsp) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Well Stacked Pizza shop");
if(pos == wsp2) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Well Stacked Pizza shop 2");
if(pos == clb) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Cluckin' Bell shop");
if(pos == clb2) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Cluckin' Bell shop 2");
if(pos == bgs) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Burger Shot shop");
if(pos == bgs2) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Burger Shot shop 2");
if(pos == rcs) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from RC shop");
if(pos == hts) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Hemlock Tatoo shop");
if(pos == zip) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from ZIP shop");
if(pos == gyd) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Gayadaa Disco");
if(pos == sbu) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Suburban shop");
if(pos == brb) return SendClientMessageToAll(COLOR_GREY,"%s has robbed 2000$ from Barber Shop");
}
return 1;
}