Mein goto und bring admin command funkt nicht immer wenn ich /goto [id] dann komm ich immer zu bot was ist da falsch
if(strcmp(strget(cmdtext,0), "/goto", true) == 0)
{
if(gAdmin[playerid] == 1 || gAdmin[playerid] == 2 || gAdmin[playerid] == 3 || gAdmin[playerid] == 4)
{
new tmp[256];
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) ) { return 1; }
new Float:X, Float:Y, Float:Z;
if ( GetPlayerVehicleID( playerid ) )
{
GetPlayerPos( strval(tmp), X, Y, Z );
SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z );
} else {
GetPlayerPos( strval(tmp), X, Y, Z );
SetPlayerPos( playerid, X+2, Y+2, Z );
}
}
return 1;
}
if(strcmp(strget(cmdtext,0), "/bring", true) == 0)
{
if(gAdmin[playerid] == 2 || gAdmin[playerid] == 3 || gAdmin[playerid] == 4)
{
new tmp[256];
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) ) { return 1; }
new Float:X, Float:Y, Float:Z;
if ( GetPlayerVehicleID( strval(tmp) ) )
{
GetPlayerPos( playerid, X, Y, Z );
SetVehiclePos( GetPlayerVehicleID(strval(tmp)), X+2, Y+2, Z );
} else {
GetPlayerPos( playerid, X, Y, Z );
SetPlayerPos( strval(tmp), X+2, Y+2, Z );
}
}
return 1;
}