How i can load some1 - 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)
+--- Thread: How i can load some1 (
/showthread.php?tid=307501)
How i can load some1 -
Gooday - 30.12.2011
How i can make a command for the police like /load ID and load the player in the car?
like /load ID the player id teleported in the back of the police car as passenger and cant move, than make a command /unload and free him?
Re: How i can load some1 -
sherlock - 30.12.2011
You mean basically to 'arrest' someone and place them in the back seat of your car?
Re: How i can load some1 -
Gooday - 30.12.2011
yes, i mean this i also need a /ar (time) system.. but i dont know how to make
there are the only thing i need for end my server
Re: How i can load some1 -
Elmin - 30.12.2011
Код:
//by: Swift_
new bool:PlayerInCar[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], tmp[256], targetid, idx;
new Float:x, Float:y, Float:z, Float:a;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/load", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "Usage: /load<id>");
targetid = strval(tmp);
if(IsPlayerConnected(targetid))
{
SendClientMessage(playerid, GREEN, "Player can't find the keys!");
SendClientMessage(targetid, RED, "You have been locked to police car ");
PlayerInCar[targetid] = true;
GetPlayerPos(targetid, x, y, z);
GetPlayerFacingAngle(targetid, a);
Car = CreateVehicle(597, x, y, z+5, a, 1, 1, 100000);
PutPlayerInVehicle(targetid, Car, 1);
return 1;
}
}
else return SendClientMessage(playerid, RED, "Not allowed to use this command!");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
new targetid;
if(vehicleid == Car && PlayerInCar[playerid] == true)
{
DestroyVehicle(Car);
RemovePlayerFromVehicle(targetid);
}
return 1;
}