boah warte ich editiere gleich habs glaub ich
#include <a_samp>
new rob = 0;
new timerm = 0;
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward robtimer();
forward freezetimer(playerid);
//-------------------------Einstellungen der Zeit---------------------------------------
#define robtime 3000000 // Zeit wielange man nicht Klauen darf 3000000 = 30 Minuten
#define freezetime 10000 // Zeit wo man beim Ausrauhen gefreezt ist. 10000 = 10 Sekunden
//--------------------------------------------------------------------------------------
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Rob Script by Silverdark Loaded");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/rob", true) == 0)
{
if(!PlayerToPoint(20.0,playerid,2316.6189,-7.3298,26.7422))
{
SendClientMessage(playerid,0xAA3333AA,"Du bist nicht in der Bank!");
return 1;
}
if(rob)
{
SendClientMessage(playerid,0xAA3333AA,"Die Bank wurde erst Überfallen!");
return 1;
}
new randmoney = 4000 + random (25000);
GivePlayerMoney(playerid,randmoney);
TogglePlayerControllable(playerid,0);
rob = 1;
SetTimer("robtimer",robtime,0);
SetTimer("freezetimer",freezetime,0);
SendClientMessage(playerid,0xFF9933FF,"Du willst die Bank überfallen und musst 10 Sekunden warten!!!");
return 1;
}
return 0;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
public robtimer()
{
rob = 0;
}
public freezetimer(playerid)
{
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,0x00FF00FF,"Du hast es geschafft die Bank auszuräumen!");
}
}
So vielleicht wenn es nicht geht sags mir...