SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Closed Thread
 
Thread Tools Display Modes
Old 05/02/2013, 09:26 PM   #1
BlueG
Beta Tester
 
BlueG's Avatar
 
Join Date: Sep 2007
Location: Los Angeles, CA
Posts: 232
Reputation: 301
Default Script Request Thread #6

Alright, seems like the fifth thread was getting too full once again, so here we go with a new thread.

This thread is for people to post gamemode and filterscript ideas, in an effort to find people willing to help them make it. Please keep all requests to this thread, and do NOT flame or bump!


Script request archive:

Script Request Thread #5 (don't bother searching anything here, it will be a waste of time)

Script Request Thread #4

Script Request Thread #3

Script Request Thread #2

Script Request Thread #1
BlueG is offline  
Old 05/02/2013, 09:43 PM   #2
Hade.
Huge Clucker
 
Hade.'s Avatar
 
Join Date: Oct 2012
Location: Tallinn, Estonia
Posts: 210
Reputation: 16
Default Re: Script Request Thread #6

First !! I need a derby system, that when a player enters the derby, the limit is 4 (i have 4 cars) and if 4 are in the derby no-one else can join, the last on in the derby gets 10k and the cars will respawn. And it starts again.

Heres my zcmd :

Code:
CMD:derby(playerid, params[])
{
    new str7[128], player8[MAX_PLAYER_NAME];
    GetPlayerName(playerid, player8, sizeof(player8));
    format(str7,sizeof(str7),"%s teleportis end derbysse [/derby]",player8);
    SendClientMessageToAll(COLOR_GREEN,str7);
    new rand = random(sizeof(D1Rand));
    SetPlayerPos(playerid, D1Rand[rand][0], D1Rand[rand][1], D1Rand[rand][2]);
    SendClientMessage(playerid, COLOR_NGREEN,"Teleportisid end derbysse!");
    ResetPlayerWeapons(playerid);
    nocmd[playerid] = 1;
    return 1;
}
__________________
Hade. is offline  
Old 05/02/2013, 09:45 PM   #3
DerickClark
High-roller
 
Join Date: Jul 2012
Posts: 1,738
Reputation: 14
Default Re: Script Request Thread #6

i need a /setping. /setping (How Much Max)
__________________
Working on a Trucking Server from scratch.
There are cool features, like /workmenu /convoy /pay(When Police Officer asked you for a fine) and more etc.
DerickClark is offline  
Old 05/02/2013, 10:51 PM   #4
Vytixz
Big Clucker
 
Join Date: Jan 2013
Posts: 58
Reputation: 0
Default Re: Script Request Thread #6

I want a command that when I type /car, an Infernus will be spawned and I will be put inside it right away.

Optional: A message in the chat saying "You have successfully spawned an infernus."

Thank you.
Vytixz is offline  
Old 06/02/2013, 06:13 AM   #5
antonio112
High-roller
 
antonio112's Avatar
 
Join Date: Aug 2009
Location: Romania
Posts: 977
Reputation: 87
Default Re: Script Request Thread #6

Quote:
Originally Posted by Vytixz View Post
I want a command that when I type /car, an Infernus will be spawned and I will be put inside it right away.

Optional: A message in the chat saying "You have successfully spawned an infernus."

Thank you.
Here's your command in ZCMD:
Code:
//Somewhere on top of your script, under #includes
new CarSpawned[MAX_PLAYERS];

CMD:car(playerid, params[])
{
    #pragma unused params
    if(CarSpawned[playerid] > 0)
        DestroyVehicle(CarSpawned[playerid]);

    new Float: Pos[4];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerFacingAngle(playerid, Pos[3]);
    CarSpawned[playerid] = CreateVehicle(411, Pos[0], Pos[1], Pos[2], Pos[3], 1, 1, 0);
    PutPlayerInVehicle(playerid, CarSpawned[playerid], 0);
    SendClientMessage(playerid, -1, "You have successfully spawned an Infernus.");
    return 1;
}



Quote:
Originally Posted by DerickClark View Post
i need a /setping. /setping (How Much Max)
Not sure if I understood your request. If I'm not wrong, you want a ping limit and if a player reaches that ping, he'll get kicked ... Well, here it is:
Code:
//Somewhere on top of your script, under #includes
new MaxPing = 500;

CMD:setping(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "You're not allowed to use this command.");

    new ping, str[65], name[MAX_PLAYER_NAME];
    if(sscanf(params, "i", ping))
        return SendClientMessage(playerid, -1, "USAGE: /setping [MAX PING]");

    if(ping < 20 || ping > 1000)
         return SendClientMessage(playerid, -1, "Use real values, between 20 and 1000");

     GetPlayerName(playerid, name, sizeof name);
     MaxPing = ping;
     format(str, sizeof str, "Admin %s set the max ping to %i.", name, MaxPing);
     SendClientMessageToAll(-1, str);
     return 1;
}

//And now, under OnPlayerUpdate callback;

public OnPlayerUpdate(playerid)
{
    if(GetPlayerPing(playerid) > MaxPing) Kick(playerid);
    return 1;
}

If this is not what you asked for, please let me know ...
__________________
antonio112 is offline  
Old 06/02/2013, 11:10 AM   #6
lean1337
Big Clucker
 
Join Date: Nov 2012
Location: Sweden, Malmö
Posts: 170
Reputation: 22
Default Re: Script Request Thread #6

Need help with a command if possible, /vx carname, example, i do /vx sultan, it spawns a sultan and puts me in it.

Thanks.
lean1337 is offline  
Old 07/02/2013, 03:03 PM   #7
total3clipse
Little Clucker
 
Join Date: Jan 2013
Posts: 25
Reputation: 0
Default Re: Script Request Thread #6

I need a detain command that places said id into the last car you was in (Must be close to the car and person though) the command I would like is to be /detain [thereid] [seatid] I would prefer the command script to be in ZCMD. This won't be used as a police faction only command therefore I want it so everyone can use it.

Thank you.
total3clipse is offline  
Old 07/02/2013, 11:16 PM   #8
DerickClark
High-roller
 
Join Date: Jul 2012
Posts: 1,738
Reputation: 14
Default Re: Script Request Thread #6

I'm looking for a /warn with 1/3
+
/Kick
__________________
Working on a Trucking Server from scratch.
There are cool features, like /workmenu /convoy /pay(When Police Officer asked you for a fine) and more etc.
DerickClark is offline  
Old 08/02/2013, 07:13 AM   #9
antonio112
High-roller
 
antonio112's Avatar
 
Join Date: Aug 2009
Location: Romania
Posts: 977
Reputation: 87
Default Re: Script Request Thread #6

Quote:
Originally Posted by DerickClark View Post
I'm looking for a /warn with 1/3
+
/Kick
Code:
//On top of your script, under #includes

new playerWarn[MAX_PLAYERS];

CMD:warn(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "Only admins can use this command.");

    new pID, str[128], pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
    if(sscanf(params, "u", pID))
        return SendClientMessage(playerid, -1, "Usage: /warn [Player ID]");

    if(!IsPlayerConnected(pID))
        return SendClientMessage(playerid, -1, "Selected player is not connected.");

    playerWarn[pID] ++;
    GetPlayerName(playerid, pName, sizeof pName);
    GetPlayername(pID, name, sizeof name);
    format(str, sizeof str, "Admin %s warned you. Total warnings %i.", pName, playerWarn[pID]);
    SendClientMessage(pID, -1, str);
    format(str, sizoef str, "You warned player %s. Total warnings %i.", name, playerWarn[pID]);
    SendClientMessage(playerid, -1, str);
    if(playerWarn[pID] > 2)
    {
         format(str, sizeof str, "%s accumulated 3 warnings and got kicked from the server.", name);
	     SendClientMessageToAll(-1, str);
         SendClientMessage(pID, -1, "You were warned three (3) times and got kicked.");
         Kick(pID);
    }
    return 1;
}    

CMD:kick(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "Only admins can use this command.");

    new pID, str[128], pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
    if(sscanf(params, "u", pID))
        return SendClientMessage(playerid, -1, "Usage: /kick [Player ID]");

    if(!IsPlayerConnected(pID))
        return SendClientMessage(playerid, -1, "Selected player is not connected.");

    GetPlayerName(playerid, pName, sizeof pName);
    GetPlayerName(pID, name, sizeof name);
    format(str, sizeof str, "You kicked player %s.", name);
    SendClientMessage(playerid, -1, str);
    format(str, sizeof str, "Admin %s kicked you.", pName);
    SendClientMessage(pID, -1, str);
    format(str, sizeof str, "Admin %s kicked player %s.", pName, name);
    SendClientMessageToAll(-1, str);
    Kick(pID);
    return 1;
}






Quote:
Originally Posted by total3clipse View Post
I need a detain command that places said id into the last car you was in (Must be close to the car and person though) the command I would like is to be /detain [thereid] [seatid] I would prefer the command script to be in ZCMD. This won't be used as a police faction only command therefore I want it so everyone can use it.

Thank you.
Code:
//On top of your script

new LastCar[MAX_PLAYERS];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        LastCar[playerid] == GetPlayerVehicleID(playerid);
    return 1;
}

CMD:detain(playerid, params[])
{
    if(LastCar[playerid] < 1)
         return SendClientMessage(playerid, -1, "You haven't entered a vehicle, as a driver yet.");

    new Float: vehPos[3], Float: Pos[3], pID, str[128], seatid, pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
    if(sscanf(params, "ui", pID, seatid))
         return SendClientMessage(playerid, -1, "Usage: /detain [Player ID] [Seat (1-3)]");

    if(!IsPlayerConnected(pID))
         return SendClientMessage(playerid, -1, "Selected player is not connected.");

    if(seatid < 1 || seatid > 3)
         return SendClientMessage(playerid, -1, "Invalid seat ID. Use values between 1 and 3");

    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    if(!IsPlayerInRangeOfPoint(pID, 5.0, Pos[0], Pos[1], Pos[2]))
         return SendClientMessage(playerid, -1, "Selected player is not close enough.");

    GetVehiclePos(LastCar[playerid], vehPos[0], vehPos[1], vehPos[2]);
    if(!IsPlayerInRangeOfPoint(playerid, 10.0, vehPos[0], vehPos[1], vehPos[2]))
         return SendClientMessage(playerid, -1, "You're not near the last vehicle.");

    GetPlayerName(playerid, pName, sizeof pName);
    GetPlayerName(pID, name, sizeof name);
    format(str, sizeof str, "You detained %s in the vehicle ID %i, seat %i.", name, LastCar[playerid], seatid);
    SendClientMessage(playerid, -1, str);
    format(str, sizeof str, "You've been detained by %s in vehicle ID %i, seat %i.", pName, LastCar[playerid], seatid);
    SendClientMessage(pID, -1, str);
    PutPlayerInVehicle(pID, LastCar[playerid], seatid);
    return 1;
}
__________________
antonio112 is offline  
Old 08/02/2013, 04:48 PM   #10
Hade.
Huge Clucker
 
Hade.'s Avatar
 
Join Date: Oct 2012
Location: Tallinn, Estonia
Posts: 210
Reputation: 16
Default Re: Script Request Thread #6

Quote:
Originally Posted by Hade. View Post
First !! I need a derby system, that when a player enters the derby, the limit is 4 (i have 4 cars) and if 4 are in the derby no-one else can join, the last on in the derby gets 10k and the cars will respawn. And it starts again.

Heres my zcmd :

Code:
CMD:derby(playerid, params[])
{
    new str7[128], player8[MAX_PLAYER_NAME];
    GetPlayerName(playerid, player8, sizeof(player8));
    format(str7,sizeof(str7),"%s teleportis end derbysse [/derby]",player8);
    SendClientMessageToAll(COLOR_GREEN,str7);
    new rand = random(sizeof(D1Rand));
    SetPlayerPos(playerid, D1Rand[rand][0], D1Rand[rand][1], D1Rand[rand][2]);
    SendClientMessage(playerid, COLOR_NGREEN,"Teleportisid end derbysse!");
    ResetPlayerWeapons(playerid);
    nocmd[playerid] = 1;
    return 1;
}
OMG i was the first poster, and no help still? I waited like 1 week for this :S
__________________
Hade. is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Request Thread #5 jameskmonger Help Archive 8 06/03/2011 12:42 PM
Script Request Thread #4 dugi Help Archive 1712 31/10/2010 11:08 AM
Re: Script Request Thread #3 clean180ollie Help Archive 879 05/01/2010 04:08 PM
Script Request Thread #2 Dol Help Archive 807 28/07/2009 09:09 AM
Script Request Thread kaisersouse Help Archive 1112 20/03/2009 11:15 AM


All times are GMT. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.