26.07.2010, 15:29
if(!strcmp(cmdtext, "/savepos", true))
{
if(adminlevel[playerid] < 3) return 0;
else
if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
else
GetPlayerPos(playerid, xx, yy , zz);
new vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid, xx, yy, zz);
SendClientMessage(playerid, COLOR_YELLOW, "You can now use /gotopos.");
playerposition[playerid] = 1;
return 1;
}
if(!strcmp(cmdtext, "/gotopos", true))
{
if(adminlevel[playerid] < 3) return 0;
else
if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
else
if(playerposition[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot gotopos because you didnt save any position.");
else
SetPlayerPos(playerid, xx, yy , zz);
SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to your destination.");
return 1;
}
{
if(adminlevel[playerid] < 3) return 0;
else
if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
else
GetPlayerPos(playerid, xx, yy , zz);
new vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid, xx, yy, zz);
SendClientMessage(playerid, COLOR_YELLOW, "You can now use /gotopos.");
playerposition[playerid] = 1;
return 1;
}
if(!strcmp(cmdtext, "/gotopos", true))
{
if(adminlevel[playerid] < 3) return 0;
else
if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
else
if(playerposition[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot gotopos because you didnt save any position.");
else
SetPlayerPos(playerid, xx, yy , zz);
SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to your destination.");
return 1;
}