/drag command
#1

How can i create aa command that drag a player to the cop car?
Already saw that 2 times and but never saw the code.

Can anyone explain me how?

Thanks

Shellegg
Reply
#2

search for command /pullincar
Reply
#3

I've made it for GodFather

http://pastebin.com/m1eb1803c
Reply
#4

But i dont use GF xD neigher a GD edit, this RP mode is different, but i think i can modifie it..

can i try with it?
Reply
#5

Quote:
Originally Posted by Shellegg
But i dont use GF xD neigher a GD edit, this RP mode is different, but i think i can modifie it..

can i try with it?
You should understand, he gave you a pastebin link.
Reply
#6

You just need to add this and ProxDetector and ProxDetectorS
Reply
#7

and IsACop.
What i would do is modify it .
Reply
#8

what is SendClientMessage(playerid, COLOR_GREY, POLICE_TEXT);?
Reply
#9

change that POLICE_TEXT to : "You are not a cop"
Reply
#10

i tryed to add in my GM but got ssome errors, can you please tell me how to fix it?

Quote:

if(strcmp(cmd, "/meternocarro", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Nгo estбs em duty!");
}
if(PlayerCuffed[giveplayerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "O suspeito precisa ser algemado antes de ser posto no carro!");
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Precisas estar fora do carro para por o suspeito lб dentro.");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
new carid = gLastCar[playerid];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "/meternocarro [playerid/PartOfName] [seatid]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "/meternocarro [playerid/PartOfName] [seatid]");
new seat = strval(tmp);
if(seat < 0 || seat > 3)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "O seatid tem de ser entre 1 e 3");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "0 - Condutor");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "1 - Pendura");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "2 - Passageiro");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "3 - Passageiro");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Foste detido pelo agente %s .", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTYELLOW2, string);
format(string, sizeof(string), "Detes-te o suspeito %s .", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
PlayerPlayerActionMessage(playerid,suspect,15.0,"% s pega o suspeito %s e mete-o dentro do carro.", sendername ,giveplayer);
GameTextForPlayer(giveplayerid, "~r~BUSTED", 2500, 3);
ClearAnimations(giveplayerid);
TogglePlayerControllable(giveplayerid, 0);
PutPlayerInVehicle(giveplayerid,carid,seat);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Precisas estar perto do teu carro!");
return 1;
}
}
else
{
format(string, sizeof(string), "%s nгo estб online", giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
return 1;
}


COMPILE:
Quote:

C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5842) : warning 217: loose indentation
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5846) : warning 217: loose indentation
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5855) : error 017: undefined symbol "gLastCar"
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5855) : warning 215: expression has no effect
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5855) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5855) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Opadrinho\gamemodes\crp.pwn(5855) : fatal error 107: too many error messages on one line



BOLD LINES ARE ERRORS

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)