#1

Hi !
Can someone help me to make command /exit .
I wanna make this command to exit from ANY vehicle.

plss help me
Reply
#2

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;
}
Reply
#3

i get some errorrs for declaration
Reply
#4

Here compiled normally, what are the errors?
Reply
#5

(28392) : error 010: invalid function or declaration
Reply
#6

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;
}
Reply
#7

Quote:
Originally Posted by Gangasta300
Посмотреть сообщение
(28392) : error 010: invalid function or declaration
Post the line...
Reply
#8

Post the full error
Reply
#9

open samp server file and ur server will be online but if u close samp server
ur server will not be online
Reply
#10

I compiled it
but i try-ed it and when I sit in car It wont exit me from it
Reply
#11

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?
Reply
#12

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;
}
Reply
#13

One more problem lol.
Reply
#14

Yes, lol, don't need to ask it.
Reply
#15

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?
Reply
#16

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.
Reply
#17

You should give them money if they come
Reply
#18

Thank you
Reply
#19

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!");
Reply
#20

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)