fail again
#1

guys i was playing a litle with scripting and i try to make a taxi job - simple taxi job

but i allways fail...

i wanna make when player go into the Taxi,Bus it write to all players '' Kljukec is now on duty as Taxi Driver, Type /taxi To call a Taxi Service''

here is the code what i try to make:

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(gTeam[playerid] == TEAM_TAXIDRIVER >=1)
	{
	  new pname[24];
	  new string[128];
	  new giveplayerid;
		format(string, sizeof(string), "%s(%d) Taxi Driver Is On Duty! Type /taxi To Call A Taxi Service!",pname,giveplayerid);
  	SendClientMessage(playerid,0xFF7F50AA, string);
	}
	return 1;
}
... and BTW i wanna make this just for TEAM_TAXIDRIVER

and when i compile this i get an warning : tag mismatch on this line : '' if(gTeam[playerid] == TEAM_TAXIDRIVER >=1) ''

can anyone help me with this taxi job please ?

ty
Reply
#2

Quote:
Originally Posted by Geekzor
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(gTeam[playerid] == TEAM_TAXIDRIVER >=1)
	{
	  new pname[24];
	  new string[128];
	  new giveplayerid;
		format(string, sizeof(string), "%s(%d) Taxi Driver Is On Duty! Type /taxi To Call A Taxi Service!",pname,giveplayerid);
  	SendClientMessage(playerid,0xFF7F50AA, string);
	}
	return 1;
}
What is >=1 doing after TEAM_TAXIDRIVER?
Reply
#3

pawn Код:
new giveplayerid;
format(string, sizeof(string), "%s(%d) Taxi Driver Is On Duty! Type /taxi To Call A Taxi Service!",pname,giveplayerid);
No need for "new giveplayerid" And change "giveplayerid" in the string, to "playerid"
Also you need to get the players name, before creating the string.
pawn Код:
GetPlayerName(playerid, pname, sizeof(pname));
Was also wondering, what ">=1" should do.

Reply
#4

ammm this >=1 i mean to check if he is in this team so is wrong then ... sec i go check and fix my gamemode btw ty for help
Reply
#5

sry for dubble post but i wanna just say Thanks and 1 more problem ...

I wanna know that : now i wanna made /onduty command

but i dont know how to make that : TEAM_TAXIDRIVER can make this just when he is in taxi or bus !
and than SetPlayerColor(playerid, greenclor) - so when taxidriver type /onduty in taxi or bus his color change to green / light green idk what color is better for taxi driver

and it send message to all '' (Taxidriver's name) Is Now On Duty! Type /taxi To Call A Taxi Service!") --- this should write with green

and than some ''errors'' if player is not in car he get error mesage : '' You Cant Be /onduty In This Car! " etc mybe this request should go under Script Request but if u tell me how i can make just if the player is in Taxi or Bus he can type this command other - ''Error Messages'' I will try to make alone

ty for any help

Reply
#6

no help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)