Useful Commands #1
#1

As posting random "OnPlayerCommandText" is frowned upon in the Useful Functions topic, I thought I'd make a topic for posting some fun/useful/Downright useless functions to add to your OnPlayerCommandText script!

For those in need of it:
strtok:
Code:
strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
/lock: Locks Car Doors
Code:
if (strcmp(cmdtext, "/lock", true)==0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			State=GetPlayerState(playerid);
			if(State!=PLAYER_STATE_DRIVER)
			{
				SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
				return 1;
			}
			new i;
			for(i=0;i<MAX_PLAYERS;i++)
			{
				if(i != playerid)
				{
					SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
				}
			}
			SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
			GetPlayerPos(playerid,X,Y,Z);
			PlayerPlaySound(playerid,1056,X,Y,Z);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
		}
	return 1;
	}
/unlock: Unlocks Car Doors
Code:
	
if (strcmp(cmdtext, "/unlock", true)==0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			State=GetPlayerState(playerid);
			if(State!=PLAYER_STATE_DRIVER)
			{
				SendClientMessage(playerid,COLOR_GREY,"You can only unlock the doors as the driver.");
				return 1;
			}
			new i;
			for(i=0;i<MAX_PLAYERS;i++)
			{
				SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
			}
			SendClientMessage(playerid, COLOR_GREY, "Vehicle unlocked!");
			GetPlayerPos(playerid,X,Y,Z);
			PlayerPlaySound(playerid,1057,X,Y,Z);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
		}
	return 1;
	}
Reply
#2

this reely helped
Reply
#3

Code:
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(136) : error 017: undefined symbol "State"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(137) : error 017: undefined symbol "State"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(139) : error 017: undefined symbol "COLOR_GREY"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(150) : error 017: undefined symbol "COLOR_GREY"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(151) : error 017: undefined symbol "X"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(152) : error 017: undefined symbol "X"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(156) : error 017: undefined symbol "COLOR_GREY"
Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


7 Errors.
Not working for me
Reply
#4

Quote:
Originally Posted by kaka
Code:
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(136) : error 017: undefined symbol "State"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(137) : error 017: undefined symbol "State"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(139) : error 017: undefined symbol "COLOR_GREY"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(150) : error 017: undefined symbol "COLOR_GREY"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(151) : error 017: undefined symbol "X"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(152) : error 017: undefined symbol "X"
C:\DOCUME~1\Owner\Desktop\Mano\GTASER~1\GAMEMO~1\src\111.pwn(156) : error 017: undefined symbol "COLOR_GREY"
Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


7 Errors.
Not working for me
helps if you know how to code too

I just used this code (thanks Allan) so heres one that will work straight out of the box

in onplayercommandtext:
Code:
//car locking code copied from Allan.
	if (strcmp(cmdtext, "/lock", true)==0)
		{
			if(IsPlayerInAnyVehicle(playerid))
			{
				new State=GetPlayerState(playerid);
				if(State!=PLAYER_STATE_DRIVER)
				{
					SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver.");
					return 1;
				}
				new i;
				for(i=0;i<MAX_PLAYERS;i++)
				{
					if(i != playerid)
					{
						SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
					}
				}
				SendClientMessage(playerid, 0xFFFF00AA, "Vehicle locked!");
		  	new Float:pX, Float:pY, Float:pZ;
				GetPlayerPos(playerid,pX,pY,pZ);
				PlayerPlaySound(playerid,1056,pX,pY,pZ);
			}
			else
			{
				SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
			}
		return 1;
		}
		

if (strcmp(cmdtext, "/unlock", true)==0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			new State=GetPlayerState(playerid);
			if(State!=PLAYER_STATE_DRIVER)
			{
				SendClientMessage(playerid,0xFFFF00AA,"You can only unlock the doors as the driver.");
				return 1;
			}
			new i;
			for(i=0;i<MAX_PLAYERS;i++)
			{
				SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
			}
			SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");
			new Float:pX, Float:pY, Float:pZ;
			GetPlayerPos(playerid,pX,pY,pZ);
			PlayerPlaySound(playerid,1057,pX,pY,pZ);
		}
		else
		{
			SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
		}
	return 1;
	}
and you you want the for loop in on player exit vehicle.

Code:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	//printf("OnPlayerExitVehicle(%d, %d)", playerid, vehicleid);

	for(new i=0;i<MAX_PLAYERS;i++)
	{
		if(i != playerid)
		{
			SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
		}
	}
	

	return 1;
}
Reply
#5

I got it almost working, but I got these 2 errors within the script:
Code:
D:\Program Files\Rockstar Games\MTASA\samp\gamemodes\src\naziroad.pwn(272) : error 035: argument type mismatch (argument 1)
D:\Program Files\Rockstar Games\MTASA\samp\gamemodes\src\naziroad.pwn(301) : error 035: argument type mismatch (argument 1)
Reply
#6

Hidden Command
Code:
	if(strcmp(cmd, "/other", true) == 0 || strcmp(cmd, "/hidden", true) == 0) {
		SendPlayerFormattedText(playerid,"Look at you, you found the hidden command!!!",0);
	return 1;
	}
Don't put this in your /commands or /help.

800 foot fall from your current location
Code:
	if(strcmp(cmd, "/bigfall", true) == 0) {
				if(IsPlayerInAnyVehicle(playerid)) {
				    new Float:X;
					new Float:Y;
					new Float:Z;
				    new VehicleID;
				    GetPlayerPos(playerid, X, Y, Z);
				    VehicleID = GetPlayerVehicleID(playerid);
					SetVehiclePos(VehicleID, X, Y, Z + 800.00);
					SetPlayerFacingAngle(playerid,Ang);
					GivePlayerWeapon(playerid,46,1);
				} else {
					new Float:X;
					new Float:Y;
					new Float:Z;
					GetPlayerPos(playerid, X, Y, Z);
					SetPlayerPos(playerid, X, Y, Z + 800.00);
					SetPlayerFacingAngle(playerid,Ang);
					GivePlayerWeapon(playerid,46,1);
					GameTextForPlayer(playerid, "~w~Weeeeeeeeeeeeeeeeee!!",8000,5);
 				 }
			return 1;
		}
Wtf?
Code:
		else if(strcmp(cmd, "/wtf", true) == 0) {
			if(IsPlayerInAnyVehicle(playerid)) {
					new Float:X;
					new Float:Y;
					new Float:Z;
				  new VehicleID;
				  GetPlayerPos(playerid, X, Y, Z);
				  VehicleID = GetPlayerVehicleID(playerid);
					SetVehiclePos(VehicleID, X, Y, Z + 100000000000000);
					SetPlayerFacingAngle(playerid,Ang);
					SetPlayerInterior(playerid,0);
					GameTextForPlayer(playerid, "~y~OMGWTF~p~BBQ ~r~BIGP3NISLOLRARROF~g~LCOPTER!!11s~w~hift11one",6000,5);
				} else {
					new Float:X;
					new Float:Y;
					new Float:Z;
					GetPlayerPos(playerid, X, Y, Z);
					SetPlayerPos(playerid, X, Y, Z + 100000000000000);
					SetPlayerFacingAngle(playerid,Ang);
					SetPlayerInterior(playerid,0);
					GameTextForPlayer(playerid, "~y~OMGWTF~p~BBQ ~r~BIGP3NISLOLRARROF~g~LCOPTER!!11s~w~hift11one",6000,5);
					}
			return 1;
		}
OMG ITS GONE!!!
Code:
		if(strcmp(cmdtext,"/clearchat",true)==0) // Chat window is gone, fomg!
		{
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
			SendClientMessage(playerid,COLOR_GREY," ");
            SendClientMessage(playerid,COLOR_GREY," ");
		return 1;
		}
i do nothing
Code:
		if(strcmp(cmdtext,"/nothing",true)==0) 
		{
            //do nothing
		return 1;
		}
Speak your soul
Code:
		else if(strcmp(cmd, "/sayall", true) == 0) { //type "/sayall ~r~ Hello bob!" (Edit the MSG and text)
  			new name[256];
  			new tmp[256];
    		new tstring[256];
  			tmp = strtokspace(cmdtext, idx);
  			GetPlayerName(playerid,name,sizeof(name));
  			format(tstring, sizeof(tstring), "*** %s: %s",name,tmp);
  			GameTextForAll(tmp,5000,3);
   		return true;
		}
Reply
#7

Quote:
Originally Posted by OffRoader23
I got it almost working, but I got these 2 errors within the script:
Code:
D:\Program Files\Rockstar Games\MTASA\samp\gamemodes\src\naziroad.pwn(272) : error 035: argument type mismatch (argument 1)
D:\Program Files\Rockstar Games\MTASA\samp\gamemodes\src\naziroad.pwn(301) : error 035: argument type mismatch (argument 1)
assuming you didnt use the one i posted. You need to setup your xyz variables that store where the player is as floats, eg
new Float:X, Float:Y, Float:Z;
instead of
new X, Y, Z;

anyway this thread is about making commands so its time I start thinking of some good ones
Reply
#8

I have done something similar to something someone has done before. But I just change it a little bit that the vehicle gets into your front using sine and cosine. This is how a mathematician does things!
Code:
	if (strcmp(cmdtext, "/purchase", true)==0) // to set the vehicle that you register to be teleported
	{
	  if (GetPlayerMoney(playerid) < 5000)
	  {
			SendClientMessage(playerid,YELLOW,"Sorry, you don't have enough money to buy a car.");
		}
		else
		{
			if (IsPlayerInAnyVehicle(playerid) == 1)
			{
				SetVehicleToRespawn(ownedcar[playerid]);
				ownedcar[playerid] = GetPlayerVehicleID(playerid);
				owner[ownedcar[playerid]] = playerid;
				SendClientMessage(playerid,YELLOW,"Congragulations! You have purchased a new car.");
				GivePlayerMoney(playerid,-5000);
			}
			else
			{
	      SendClientMessage(playerid,YELLOW,"Please get in a vehicle to buy it.");
			}
		}
		return 1;
	}
	if (strcmp(cmdtext, "/callmycar", true)==0)
	{
	  if (ownedcar[playerid] != 0)
	  {
   	  if (GetPlayerMoney(playerid) < 500)
		  {
				SendClientMessage(playerid,YELLOW,"Sorry, you don't have enough money to use the car teleport service.");
			}
			else
			{
		    new Float:playerpos[4];
		  	GetPlayerPos(playerid,playerpos[0],playerpos[1],playerpos[2]);
		  	GetPlayerFacingAngle(playerid,playerpos[3]);
		  	SetVehicleZAngle(ownedcar[playerid],playerpos[3]+90.0);
		  	SetVehiclePos(ownedcar[playerid],playerpos[0]+3.0*floatsin(-playerpos[3],degrees),playerpos[1]+3.0*floatcos(-playerpos[3],degrees),playerpos[2]+0.5); // This one is cool that I am using trigo functions to set the vehicle just before you.
		  	SendClientMessage(playerid,YELLOW,"Thank you for using car teleport service. Your car has came.");
		  	GivePlayerMoney(playerid,-500);
			}
	  }
		return 1;
	}
Reply
#9

A function for displaying my kills/deaths/teamkills, just added it to my script a moment ago.

Some vars :

Code:
//Players kills + deaths vars
new MyKills[MAX_PLAYERS];
new MyDeaths[MAX_PLAYERS];
new MyTeamKills[MAX_PLAYERS];
//Colour
#define COLOR_YELLOW 0xFFFF00AA
The function :

Code:
//ShowScore
ShowScore(playerid)
{
new tmpTotal[128];
format(tmpTotal, sizeof(tmpTotal), "Kills :%d, Deaths :%d, Team Kills :%d", MyKills[playerid], MyDeaths[playerid], MyTeamKills[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, tmpTotal);
}
OnPlayerDeath() :

Code:
MyDeaths[playerid]++; //Put at top of the function under printf(.....)
MyKills[killerid]++;  //I have this under the valid kill section of code
MyTeamKills[killerid]++; //I have this under the invalid(teamkill) section of code
OnPlayerCommandText() :

Code:
//-------------------/score
if(strcmp(cmd, "/score", true) == 0) {
  ShowScore(playerid);
  return 1;
  }
Enjoy...

Reply
#10

wach! change day to night or night to day!
Code:
if (strcmp(cmdtext, "/night", true)==0)
	{
	  /* Do something here */
	  SetWorldTime(0);
	  GameTextForPlayer(playerid,"~b~notte ~b~oscura ~g~LOL",5000,5);
	  return 1;
	}
Quote:

if (strcmp(cmdtext, "/day", true)==0)
{
/* Do something here */
SetWorldTime(12);
GameTextForPlayer(playerid,"~p~Giorno ~p~Felice ~p~LOL",5000,5);
return 1;
}

good
Reply
#11

pawn Code:
if (strcmp(cmd, "/report") == 0)
    {
        if (strlen(cmdtext) > 8)
        {
          GetPlayerName(playerid, playername, sizeof(playername));
          format(string, sizeof(string), "Report from %s(%d): %s", playername, playerid, cmdtext[8]);
          SendMessageToAdmins(string);
            format(string, sizeof(string), "Report sent to currently online admins.");
            SendMessage(playerid, string);
        }
        else {
        format(string, sizeof(string), "Usage: /report <text to send>");
        SendMessage(playerid, string);
        }
      return 1;
    }

--------------------------------------------

SendMessageToAdmins(const str[])
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
      if (IsPlayerConnected(i)) {
        if (IsPlayerAdmin(i)) {
          SendClientMessage(i, 0xFF9900AA, str);
        }
      }
    }
}

SendMessage(playerid, const str[])
{
    SendClientMessage(playerid, 0xFF9900AA, str);
}
Reply
#12

can someone help? i\'m idiot in scripting (NO I DONT WANT TO LEARN), can somebody help with this? i integrate all this script and it gets a lot of errors

i want to make it like filterscript, i almost got it, but some kind off shit. can someone help?

Code:
D:\MYGAME~1\GTASAN~1\samp\pawno
ew.pwn(19) : error 017: undefined symbol "cmd"
D:\MYGAME~1\GTASAN~1\samp\pawno
ew.pwn(23) : error 017: undefined symbol "playername"
D:\MYGAME~1\GTASAN~1\samp\pawno
ew.pwn(23) : error 017: undefined symbol "playername"
D:\MYGAME~1\GTASAN~1\samp\pawno
ew.pwn(23) : error 029: invalid expression, assumed zero
D:\MYGAME~1\GTASAN~1\samp\pawno
ew.pwn(23) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


5 Errors.
this is the errors

here is the script

Code:
#include <a_samp>


public OnFilterScriptInit() {
	print("
----------------------------------");
	print("Filterscript Blah sucessfully loaded");
	print("----------------------------------
");
}

public OnFilterScriptExit() {
	print("
----------------------------------");
	print("Filterscript Blah sucessfully un-loaded");
	print("----------------------------------
");
}


public OnPlayerCommandText(playerid, cmdtext[]) {

if (strcmp(cmd, "/report") == 0)
{
if (strlen(cmdtext) > 8)
{
  GetPlayerName(playerid, playername, sizeof(playername));
  format(string, sizeof(string), "Report from %s(%d): %s", playername, playerid, cmdtext[8]);
  SendMessageToAdmins(string);
format(string, sizeof(string), "Report sent to currently online admins.");
SendMessage(playerid, string);
}
else {
    format(string, sizeof(string), "Usage: /report <text to send>");
    SendMessage(playerid, string);
}
  return 1;
}

--------------------------------------------

SendMessageToAdmins(const str[])
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
  if (IsPlayerConnected(i)) {
    if (IsPlayerAdmin(i)) {
      SendClientMessage(i, 0xFF9900AA, str);
    }
  }
}
}

SendMessage(playerid, const str[])
{
SendClientMessage(playerid, 0xFF9900AA, str);
}
Reply
#13

Quote:
Originally Posted by Roka
can someone help? i\'m idiot in scripting (NO I DONT WANT TO LEARN), can somebody help with this? i integrate all this script and it gets a lot of errors
dont think anyone can do aqnything untill they see your errors which oyu keep getting. And you dont want ot learn how to fix them so you gona have to post your code!!!
Reply
#14

i posted

oh nevermind, i got it how to mak this filterscript to work
Reply
#15

Y_less oh sorry, now i now how to creat filterscripts, and how to find where is problem
Reply
#16

Gets you/your car and you to very veri high to mountain. (2 min drop)
Code:
if(strcmp(cmd, "/hyppy3", true) == 0) {
 if (IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid),-2719.0679,-1685.8645,9999.9999);
 else SetPlayerPos(playerid,-2719.0679,-1685.8645,9999.9999);
 GameTextForPlayer(playerid,"jee hyppy3",4000,5);
return 1;
}
Reply
#17

Quote:
Originally Posted by Joshua Yu
I have done something similar to something someone has done before. But I just change it a little bit that the vehicle gets into your front using sine and cosine. This is how a mathematician does things!
Code:
	if (strcmp(cmdtext, "/purchase", true)==0) // to set the vehicle that you register to be teleported
	{
	  if (GetPlayerMoney(playerid) < 5000)
	  {
			SendClientMessage(playerid,YELLOW,"Sorry, you don\'t have enough money to buy a car.");
		}
		else
		{
			if (IsPlayerInAnyVehicle(playerid) == 1)
			{
				SetVehicleToRespawn(ownedcar[playerid]);
				ownedcar[playerid] = GetPlayerVehicleID(playerid);
				owner[ownedcar[playerid]] = playerid;
				SendClientMessage(playerid,YELLOW,"Congragulations! You have purchased a new car.");
				GivePlayerMoney(playerid,-5000);
			}
			else
			{
	      SendClientMessage(playerid,YELLOW,"Please get in a vehicle to buy it.");
			}
		}
		return 1;
	}
	if (strcmp(cmdtext, "/callmycar", true)==0)
	{
	  if (ownedcar[playerid] != 0)
	  {
   	  if (GetPlayerMoney(playerid) < 500)
		  {
				SendClientMessage(playerid,YELLOW,"Sorry, you don\'t have enough money to use the car teleport service.");
			}
			else
			{
		    new Float:playerpos[4];
		  	GetPlayerPos(playerid,playerpos[0],playerpos[1],playerpos[2]);
		  	GetPlayerFacingAngle(playerid,playerpos[3]);
		  	SetVehicleZAngle(ownedcar[playerid],playerpos[3]+90.0);
		  	SetVehiclePos(ownedcar[playerid],playerpos[0]+3.0*floatsin(-playerpos[3],degrees),playerpos[1]+3.0*floatcos(-playerpos[3],degrees),playerpos[2]+0.5); // This one is cool that I am using trigo functions to set the vehicle just before you.
		  	SendClientMessage(playerid,YELLOW,"Thank you for using car teleport service. Your car has came.");
		  	GivePlayerMoney(playerid,-500);
			}
	  }
		return 1;
	}
ppl plZ help,
how to good fix this errors:
Code:
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 017: undefined symbol "ownedcar"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : warning 215: expression has no effect
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 001: expected token: ";", but found "]"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 029: invalid expression, assumed zero
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


4 Errors.
Reply
#18

pawn Code:
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 017: undefined symbol "ownedcar"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : warning 215: expression has no effect
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 001: expected token: ";", but found "]"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 029: invalid expression, assumed zero
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367          Copyright (c) 1997-2005, ITB CompuPhase


4 Errors.
owndecar is not declared, put on top of your script new ownedcar[MAX_PLAYERS]; (or just new ownedcar
second, dunno, own prob
put an ; at the end of line 1033

Should fix a lot, remember, this is a Function Share topic, not an error fixing, next time create a new topic with a link to this post.

TIP: for a correct fix, paste the the lines 1030 till 1040... not just the error\'s
Reply
#19

Just defining owned car should fix the whole problem
Reply
#20

Quote:
Originally Posted by LennardF[NL
]
pawn Code:
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 017: undefined symbol "ownedcar"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : warning 215: expression has no effect
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 001: expected token: ";", but found "]"
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : error 029: invalid expression, assumed zero
C:\Games\GTA srv\gamemodes\src\lvdmod.pwn(1034) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367          Copyright (c) 1997-2005, ITB CompuPhase


4 Errors.
owndecar is not declared, put on top of your script new ownedcar[MAX_PLAYERS]; (or just new ownedcar
second, dunno, own prob
put an ; at the end of line 1033

Should fix a lot, remember, this is a Function Share topic, not an error fixing, next time create a new topic with a link to this post.

TIP: for a correct fix, paste the the lines 1030 till 1040... not just the error\'s
owned car is an array.
Reply


Forum Jump:


Users browsing this thread: