08.01.2013, 17:27
(
Последний раз редактировалось martin3644; 08.01.2013 в 18:05.
Причина: Post Updated!
)
Hello!
I need a little bit help with my goto command. When I use goto and I'm in a car, then my car disappears. How to fix this
Thank You!
I need a little bit help with my goto command. When I use goto and I'm in a car, then my car disappears. How to fix this
Код:
dcmd_goto(playerid, params[])
{
#pragma unused params
new ID;
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_BLUE, "USAGE: /goto [ID]");
else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player is offline or it is yourself");
if(toggoto[ID] == 1)
{
new string[50], name[MAX_PLAYER_NAME];
format(string, sizeof(string), "%s's has Disabled goto! /toggoto", GetPlayerName(playerid, name, sizeof(name)));
GameTextForPlayer(playerid,string,2000,3);
return 1;
}
else
{
new Float:x, Float:y, Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(ID, x+2, y, z);
}
return 1;
}
dcmd_toggoto(playerid, params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
if(toggoto[playerid] == 1)
{
toggoto[playerid] = 0;
GameTextForPlayer(playerid,"~b~You have ~g~enabled ~b~goto",2000,3);
return 1;
}
else
{
toggoto[playerid] = 1;
GameTextForPlayer(playerid,"~b~You have ~r~disabled ~b~goto",2000,3);
return 1;
}
}
return 1;
}



