Helpful thing - 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: Helpful thing (
/showthread.php?tid=155695)
Helpful thing -
tanush - 19.06.2010
This is my first script i made and its tested + working. It removes whoever in ur car like /eject [id]. If you have problems add
tanush-thebest10@hotmail.com
http://pastebin.com/WnjTLP7X
Re: Helpful thing -
tanush - 19.06.2010
edit, the new web is
http://pastebin.com/3YxYneDC < < WEB
Re: Helpful thing -
Flashy - 19.06.2010
Lol? This isnґt a script. This is just a little basic command.
And this comand exist 1.000 times.
Well if this is your first "script" I must say you must learn a lot I guess xDD
Re: Helpful thing -
Biscottinis - 19.06.2010
That ejects only you. 1/10
Re: Helpful thing -
ViruZZzZ_ChiLLL - 19.06.2010
Try this :
pawn Код:
new playerid2;
new Float:x, Float:y, Float:z;
CMD:eject(playerid, params[])
{
if(sscanf(params, "u", playerid2)) SendClientMessage(playerid, Color, "USAGE : /eject [playerid]");
else if(playerid2 == INVALID_PLAYER_ID) SendClientMessage(Playerid, Color, "ERROR : That player is not connected!");
else if(IsPlayerInAnyVehicle(playerid2, GetPlayerVehicleID(playerid)) == 0) SendClientMessage(playerid, Color, "ERROR : That player is not in your vehicle!");
{
GetPlayerPos(playerid2, x, y, z);
SetPlayerPos(playerid2, x+3, y, z);
SendClientMessage(playerid2, Color, "You have been ejected!");
}
return 1;
}
Sorry but I'm to tired to make it better, but thats an example
on how to do it.
Note : You need Sscanf and ZCMD for it to work.
DCMD is fine also.
Re: Helpful thing -
tanush - 19.06.2010
noo, it didnt happen to me
Re: Helpful thing -
Kar - 19.06.2010
or.
Код:
dcmd(eject,5,cmdtext);
Код:
dcmd_eject(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid)){
if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /eject [Player/ID]");
new giveplayerid = ReturnUser(params);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid))){
if(IsPlayerConnected(giveplayerid) && playerid != giveplayerid){
SendFormattedMessage(playerid,ORANGE,"[EJECT]: You have ejected %s(%i)from your vehicle.", GetName(giveplayerid), giveplayerid);
SendFormattedMessage(giveplayerid,ORANGE,"[EJECT]: You got ejected from %s's(%d) vehicle.", GetName(playerid), playerid);
RemovePlayerFromVehicle(giveplayerid);} }
}
return true;
}
should work
Re: Helpful thing -
tanush - 19.06.2010
ermm maybe my admin system is making me kick people out
![Shocked](images/smilies/surprised.gif)
sorry