Sziasztok. Egy kis problémával küszködök, de nem tudok rájönni, hogy mi a probléma oka.. Tehát, ha bírok egy teleportot, akkor kidob a szerver, majd újracsatlakozik.. Itt egy kód, a probléma fix hogy itt van.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/mycommand\", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
CMD:lspk(playerid, params[])
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"{0000FF}%s {FFFF00}Elteleportált Los Santos-i Parkourra!{FF0000}(/lspk)\",name);
SendClientMessageToAll(0xFFFF00AA, string);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),1813.6587,-1420.1920,13.4231);
} else {
SetPlayerPos(playerid,1813.6587,-1420.1920,13.4231);
}
return 1;
}
CMD:lsair(playerid, params[])
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"{0000FF}%s {FFFF00}Elteleportált Los Santos reptérre{FF0000}(/lsair)\",name);
SendClientMessageToAll(0xFFFF00AA, string);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),1957.9131,-2289.7188);
} else {
SetPlayerPos(playerid,1957.9131,-2289.7188);
}
return 1;
}
CMD:lvair(playerid, params[])
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"{0000FF}%s {FFFF00}Elteleportált Las Venturas reptérre{FF0000}(/lvair)\",name);
SendClientMessageToAll(0xFFFF00AA, string);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),1521.9480,1831.4257,10.8955);
} else {
SetPlayerPos(playerid,1546.0148,1801.9745,10.8955);
}
return 1;
}
CMD:sfair(playerid, params[])
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"{0000FF}%s {FFFF00}Elteleportált San Fierro reptérre{FF0000}(/sfair)\",name);
SendClientMessageToAll(0xFFFF00AA, string);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),-1319.3417,-220.7780);
} else {
SetPlayerPos(playerid,-1319.3417,-220.7780);
}
return 1;
}