Little problem
#1

Код:
  if(strcmp(cmd, "/ccline", true) == 0)
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))
	{
	SendClientMessage(playerid, 0x919191FF, "USAGE: /Ccline [Line id]");
	return 1;
	}
  lineid = strval(tmp);
  if(lineid > 4)
  {
	SendClientMessage(playerid, 0x919191FF, "There is no number of line..max is 4");
  return 1;
  }
	if(lineid == 1)
 	{
	DisablePlayerCheckpoint(playerid);
 	DRIVERCP[playerid]++;
  	SetPlayerCheckpoint(playerid,LineOne[1][0],LineOne[1][1],LineOne[1][2],5.0);
	return 1;
	}
	if(lineid == 2)
 	{
	DisablePlayerCheckpoint(playerid);
 	DRIVERCP[playerid]++;
  	SetPlayerCheckpoint(playerid,LineTow[1][0],LineTow[1][1],LineTow[1][2],5.0);
  	}
	return 1;
	}
this command don't work , don't do anything..
--------------------------------------
and how can i do,that when every player enter to every bus in the server,i wil be able to do any command? [ i nned to know this thing only]
Код:
	if(!IsPlayerInVehicle(GetPlayerVehicleID(playerid),437))
	{
	SendClientMessage(playerid,COLOR_RED,"You're not in the BUS!");
	return 1;
it's don't work...

thanks
Reply
#2

?....
Reply
#3

if(!IsPlayerInVehicle(GetPlayerVehicleID(playerid) ,437)) means the vehicle id, not the model id..

Go trought wiki a bit.
Reply
#4

so what sould i do?
Reply
#5

Read information @ wiki.
Reply
#6

i entered, i find the two codes,and still the code don't work
Reply
#7

[pawn]
if(GetVehicleMode(GetPlayerVehicleID(playerid)!=bu sid)) return SendClientMessage,0playerid,color,"You're not in a bus.");
Reply
#8

Код:
	if(GetVehicleModel(GetPlayerVehicleID(playerid) != 437)){
 	SendClientMessage,playerid,COLOR_RED,"You're not in a bus");
 	return 1;
 	}
i change it to thisg because it make my pawn crash[send/don't send message error

and i get some errors
Код:
C:\Documents and Settings\yossi\щемзп дтбегд\гбшйн\ълреъ\samp\0.2.2\gamemodes\bus_v2.pwn(564) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\yossi\щемзп дтбегд\гбшйн\ълреъ\samp\0.2.2\gamemodes\bus_v2.pwn(564) : error 029: invalid expression, assumed zero
C:\Documents and Settings\yossi\щемзп дтбегд\гбшйн\ълреъ\samp\0.2.2\gamemodes\bus_v2.pwn(564) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#9

Yeah I wrote it fast so..
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)!=busid)) return SendClientMessage(playerid,COLOR_GREY,"You're not in a bus.");
Reply
#10

i will check if it works
thanks

EDIT:
it's still don't work,i have tried to spawn a new bus, to use the in the mod buses..but i still i get the messaage:"your not in a bus'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)