Little problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little problem (
/showthread.php?tid=92414)
Little problem -
GiP_YossI - 19.08.2009
Код:
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
Re: Little problem -
GiP_YossI - 20.08.2009
?....
Re: Little problem -
MenaceX^ - 20.08.2009
if(!IsPlayerInVehicle(GetPlayerVehicleID(playerid) ,437)) means the vehicle id, not the model id..
Go trought wiki a bit.
Re: Little problem -
GiP_YossI - 20.08.2009
so what sould i do?
Re: Little problem -
MenaceX^ - 20.08.2009
Read information @ wiki.
Re: Little problem -
GiP_YossI - 20.08.2009
i entered, i find the two codes,and still the code don't work
Re: Little problem -
MenaceX^ - 20.08.2009
[pawn]
if(GetVehicleMode(GetPlayerVehicleID(playerid)!=bu sid)) return SendClientMessage,0playerid,color,"You're not in a bus.");
Re: Little problem -
GiP_YossI - 20.08.2009
Код:
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.
Re: Little problem -
MenaceX^ - 20.08.2009
Yeah I wrote it fast so..
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)!=busid)) return SendClientMessage(playerid,COLOR_GREY,"You're not in a bus.");
Re: Little problem -
GiP_YossI - 20.08.2009
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'