Wie bekomme ich dieses
"Stay within the world boundaries" weg?
//EDIT:
Das Gamemode ist Blank..
das einzige was ich geändert habe:
OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0);
/*
ymax
|----------|
| |
xmin | | xmax
| |
|----------|
ymin
*/
SetPlayerPos(playerid,0,0,5);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,0);
return 1;
}
{
SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0);
/*
ymax
|----------|
| |
xmin | | xmax
| |
|----------|
ymin
*/
SetPlayerPos(playerid,0,0,5);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,0);
return 1;
}
OnPlayerCommandText
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
new tmp[256];
cmd = strtok(cmdtext, idx);
if (strcmp("/buynitro", cmdtext, true, 10) == 0)
{
if(Inventar[playerid][pNitro] > 1)
{
new anzahl;
tmp = strtok(cmdtext,idx);
anzahl = strval(tmp);
if(anzahl+Inventar[playerid][pNitro] > 10) return Fehler(playerid,"Du kannst nur maximal 10x Nitro dabei haben!");
Inventar[playerid][pNitro] += anzahl;
GivePlayerMoney(playerid,anzahl*500);
formatEx(playerid,0xFEFEFEFE,"Du hast dir %ix Nitro gekauft!",anzahl);
return 1;
}
return 1;
}
if (strcmp("/nitro", cmdtext, true, 10) == 0)
{
if(Inventar[playerid][pNitro] > 1)
{
new veh = GetPlayerVehicleID(playerid);
AddVehicleComponent(veh,1010);
Inventar[playerid][pNitro]--;
return 1;
}
return 1;
}
return 0;
}
{
new idx;
new cmd[256];
new tmp[256];
cmd = strtok(cmdtext, idx);
if (strcmp("/buynitro", cmdtext, true, 10) == 0)
{
if(Inventar[playerid][pNitro] > 1)
{
new anzahl;
tmp = strtok(cmdtext,idx);
anzahl = strval(tmp);
if(anzahl+Inventar[playerid][pNitro] > 10) return Fehler(playerid,"Du kannst nur maximal 10x Nitro dabei haben!");
Inventar[playerid][pNitro] += anzahl;
GivePlayerMoney(playerid,anzahl*500);
formatEx(playerid,0xFEFEFEFE,"Du hast dir %ix Nitro gekauft!",anzahl);
return 1;
}
return 1;
}
if (strcmp("/nitro", cmdtext, true, 10) == 0)
{
if(Inventar[playerid][pNitro] > 1)
{
new veh = GetPlayerVehicleID(playerid);
AddVehicleComponent(veh,1010);
Inventar[playerid][pNitro]--;
return 1;
}
return 1;
}
return 0;
}