Goto Command Help Needed
#9

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Just check if playerid is driver with
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
then use SetVehiclePos function, else SetPlayerPos
I'm not very pro but you mean like 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);
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	GetVehiclePos(vehicleid, x, y, z);
	SetVehiclePos(vehicleid, x+3, y ,z);
	return 1;
	}
	else
	{
  	new Float:x, Float:y, Float:z;
	GetPlayerPos(ID, x, y, z);
	SetPlayerPos(ID, x+2, y, z);
	}
	return 1;
	}
error 017: undefined symbol "vehicleid"
Reply


Messages In This Thread
Goto Command Help Needed - by martin3644 - 08.01.2013, 17:27
Re: Goto Command Help Needed - by Kittylol - 08.01.2013, 17:46
Re: Goto Command Help Needed - by martin3644 - 08.01.2013, 17:49
Re: Goto Command Help Needed - by Kittylol - 08.01.2013, 17:56
Re: Goto Command Help Needed - by martin3644 - 08.01.2013, 17:58
Re: Goto Command Help Needed - by Kittylol - 08.01.2013, 18:02
Re: Goto Command Help Needed - by martin3644 - 08.01.2013, 18:02
Re: Goto Command Help Needed - by Konstantinos - 08.01.2013, 18:09
Re: Goto Command Help Needed - by martin3644 - 08.01.2013, 18:24
Re: Goto Command Help Needed - by Konstantinos - 08.01.2013, 18:32

Forum Jump:


Users browsing this thread: 3 Guest(s)