My pawno gives errors
#1

So, im trying out some stuff with my own server, and i need a command to spawn vehicles.
now someone gave me that, and i put it in pawno, but it gives some errors.
Could someone fix it for me please?

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new idx;
new cmd[256];
new tmp[256];
new PlayerName[32];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
cmd = strtok(cmdtext, idx);
		if (strcmp(cmd, "/vec", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, 0x7D8778FF, "ERROR: No vehicle ID given.");
			return 1;
		}
		if (IsPlayerAdmin(playerid))
		{
		  new carid = strval(tmp);
		  new Float:playerX,Float:playerY,Float:playerZ,Float:newX,Float:newY,Float:Angle;
			GetPlayerPos(playerid,playerX,playerY,playerZ);
			GetPlayerFacingAngle(playerid, Angle);
			newX = playerX + (5 * floatsin(-Angle, degrees));
			newY = playerY + (5 * floatcos(-Angle, degrees));
			CreateVehicle(carid, newX, newY, playerZ, Angle,-1,-1,10000);
		}
		return 1;
	}
}
Reply


Messages In This Thread
My pawno gives errors - by Sidney_J - 02.01.2009, 12:38
Re: My pawno gives errors - by -John- - 02.01.2009, 12:50
Re: My pawno gives errors - by Sidney_J - 02.01.2009, 13:03
Re: My pawno gives errors - by -John- - 02.01.2009, 13:09
Re: My pawno gives errors - by Zezombia - 02.01.2009, 13:17
Re: My pawno gives errors - by Sidney_J - 02.01.2009, 13:21
Re: My pawno gives errors - by -John- - 02.01.2009, 13:22
Re: My pawno gives errors - by Sidney_J - 02.01.2009, 13:26
Re: My pawno gives errors - by Zezombia - 02.01.2009, 13:27
Re: My pawno gives errors - by Sidney_J - 02.01.2009, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)