/exit -
Gangasta300 - 09.04.2011
Hi !
Can someone help me to make command /exit .
I wanna make this command to exit from ANY vehicle.
plss help me
Re: /exit -
Shelby - 09.04.2011
pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0080FF, "You need to be in a vehicle.");
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFF0080FF, "You have been removed from vehicle.");
return 1;
}
Re: /exit -
Gangasta300 - 09.04.2011
i get some errorrs for declaration
Re: /exit -
Shelby - 09.04.2011
Here compiled normally, what are the errors?
Re: /exit -
Gangasta300 - 09.04.2011
(28392) : error 010: invalid function or declaration
Re: /exit -
Njix - 09.04.2011
if(strcmp(cmd, "/exit", true)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0080FF, "Get in a vehicle first.");
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFF0080FF, "You have left out the Vehicle.");
return 1;
}
Re: /exit -
Shelby - 09.04.2011
Quote:
Originally Posted by Gangasta300
(28392) : error 010: invalid function or declaration
|
Post the line...
Re: /exit -
Njix - 09.04.2011
Post the full error
Re: /exit -
misho1 - 09.04.2011
open samp server file and ur server will be online but if u close samp server
ur server will not be online
Re: /exit -
Gangasta300 - 09.04.2011
I compiled it
but i try-ed it and when I sit in car It wont exit me from it
Re: /exit -
Gangasta300 - 09.04.2011
I made it work!
listen I have one more question!
now when I enter /exit it exit me form car but it stuck because my rent system still block my movements so I cant move! how can i solve that?
Re: /exit -
Shelby - 09.04.2011
pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0080FF, "You need to be in a vehicle.");
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFF0080FF, "You have been removed from vehicle.");
TogglePlayerControllable(playerid, true);// <<<
return 1;
}
Re: /exit -
Gangasta300 - 09.04.2011
One more problem lol.
Re: /exit -
Shelby - 09.04.2011
Yes, lol, don't need to ask it.
Re: /exit -
Gangasta300 - 09.04.2011
My bro made sys when the cars health is under 10 in stops. now I wanna make command to call mechanic with command /callmechanic and all mechanic get message that i need help and they got 40 seconds to come to me or the check poin will desapear. Can U help me to do this?
Re: /exit -
Shelby - 09.04.2011
pawn Код:
new callmechanic=999;
forward CP(playerid);
//--------------------------------------------------------------
if(strcmp(cmd, "/acceptcall", true) == 0)
{
if(callmechanic==999) return SendClientMessage(playerid, 0xFF0080FF, "No one need your help!");
SendClientMessage(playerid, 0xFF0080FF, "You accepted the call, you have 40seconds to be there.");
new iStr[128];
format(iStr, sizeof(iStr), "%s have accepted your call.");
SendClientMessage(playerid, 0xFF0080FF, iStr);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(callmechanic, X, Y, Z);
SetPlayerCheckpoint(playerid,X,Y,Z,5.0);
SetTimerEx("CP", 40000, 0, "i", playerid);
callmechanic=999;
return 1;
}
//
if(strcmp(cmd, "/callmechanic", true) == 0)
{
new iStr[128];
format(iStr, sizeof(iStr), "%s need a mechanic, use /acceptcall.");
SendClientMessageToAll(0xFF0080FF, iStr);
callmechanic = playerid;
return 1;
}
//--------------------------------------------------------------
public CP(playerid)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, 0xFF0080FF, "Time ended.");
return 1;
}
You'll need to change somethings from it.
Re: /exit -
Njix - 09.04.2011
You should give them money if they come
Re: /exit -
Gangasta300 - 09.04.2011
Thank you
Re: /exit -
Njix - 09.04.2011
you can change this cmd
format(iStr, sizeof(iStr), "%s need a mechanic, use /acceptcall
into
format(iStr, sizeof(iStr), "%s need a mechanic, use /ac
and this
if(callmechanic==999) return SendClientMessage(playerid, 0xFF0080FF, "No one need your help!");
into if(callmechanic==999) return SendClientMessage(playerid, 0xFF0080FF, "We Need Your Help!");
and this SendClientMessage(playerid, 0xFF0080FF, "Time ended.");
into
SendClientMessage(playerid, 0xFF0080FF, "You Slow Failer!");
Re: /exit -
Gangasta300 - 09.04.2011