COMMAND:goto(playerid, params[])
{
new ID;
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /goto [id]");something after /goto if no it sends error
else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "You can't teleport to that player right now!");
if(GotoDisabled[ID] == 1)
{
new string[50], name[MAX_PLAYER_NAME];
format(string, sizeof(string), "%s's goto is disabled!", GetPlayerName(playerid, name, sizeof(name)));
GameTextForPlayer(playerid,string,2000,3);
else if(PlayerInfo[playerid][AdminLevel] >= LEVEL_goto1){
new Float:x, Float:y, Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
return 1;
}
if(GotoDisabled[ID] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
}
return 1;
}
this cmd checks first if player is connect then if the goto that u want to tele to is enabled then teles you if the goto is disabled gametext name's goto is disabled all i wanna do is make admins tele even when goto is disabled and i want to tele with car can anyone help in it ???
http://ift.tt/1rkX2WR pastebin link
{
new ID;
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /goto [id]");something after /goto if no it sends error
else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "You can't teleport to that player right now!");
if(GotoDisabled[ID] == 1)
{
new string[50], name[MAX_PLAYER_NAME];
format(string, sizeof(string), "%s's goto is disabled!", GetPlayerName(playerid, name, sizeof(name)));
GameTextForPlayer(playerid,string,2000,3);
else if(PlayerInfo[playerid][AdminLevel] >= LEVEL_goto1){
new Float:x, Float:y, Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
return 1;
}
if(GotoDisabled[ID] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
}
return 1;
}
this cmd checks first if player is connect then if the goto that u want to tele to is enabled then teles you if the goto is disabled gametext name's goto is disabled all i wanna do is make admins tele even when goto is disabled and i want to tele with car can anyone help in it ???
http://ift.tt/1rkX2WR pastebin link
Aucun commentaire:
Enregistrer un commentaire