Wieso funktioniert das nicht?
forward scar(playerid);
new SCAR[MAX_PLAYERS],Float:sx[MAX_PLAYERS], Float:sy[MAX_PLAYERS], Float:sz[MAX_PLAYERS], Float:sa[MAX_PLAYERS];
if (strcmp(cmdtext, "/scar", true)==0)
{
if (GetPlayerVirtualWorld(playerid) == 2)
{
SendClientMessage(playerid,COLOR_RED,"You cant use this command here!");
}
else
{
if (GetPlayerVirtualWorld(playerid) == 4)
{
SendClientMessage(playerid,COLOR_RED,"You cant use this command if you are jailed!");
}
else
{
if(IsPlayerInAnyVehicle(playerid))
{
SCAR[playerid] = GetPlayerVehicleID(playerid);
GetVehiclePos(SCAR[playerid], sx[playerid], sy[playerid], sz[playerid]);
GetVehicleZAngle(GetPlayerVehicleID(playerid), sa[playerid]);
SetTimer("scar",100,1);
SendClientMessage(playerid, COLOR_BASIC, "VehiclePOS saved!");
}
else
{
SendClientMessage(playerid, COLOR_BASIC, "You musst be in a vehicle!");
}
}
}
return 1;
}
public scar(playerid) {
if(!GetVehiclePos(SCAR[playerid], sx[playerid], sy[playerid], sz[playerid]))
{
if(!GetVehicleZAngle(SCAR[playerid], sa[playerid]))
{
SetVehiclePos(SCAR[playerid], sx[playerid], sy[playerid], sz[playerid]);
SetVehicleZAngle(SCAR[playerid], sa[playerid]);
}
}
return 1;
}