SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/01/2013, 12:54 AM   #1
DerickClark
High-roller
 
DerickClark's Avatar
 
Join Date: Jul 2012
Posts: 1,569
Reputation: 9
Default Need help on Helpers

If i restart my Sever it don't wanna Save,can i have it like in my scriptfiles? Helper 0 for no,Helper 1 for Yes.i wanna save it under scriptfiles
Code:
COMMAND:sethelper(playerid, params[])
{
    new pID, str[128];
    if(!IsPlayerAdmin(playerid))
    return SendClientMessage(playerid, -1, "Only admins can use this command.");
    if(sscanf(params,"u", pID))
    return SendClientMessage(playerid,-1,"USAGE: /sethelper [PlayerID]");
    if(!IsPlayerConnected(pID))
    return SendClientMessage(playerid, -1, "ERROR: Selected player is not connected.");
    if(playerHelper[pID])
    return SendClientMessage(playerid, -1, "Selected player is a helper already.");
    new name[MAX_PLAYER_NAME+1], pName[MAX_PLAYER_NAME+1];
    GetPlayerName(pID, name, sizeof name);
    GetPlayerName(playerid, pName, sizeof pName);
    playerHelper[pID] = true;
    format(str, sizeof str, "Admin %s made you a helper.", pName);
    SendClientMessage(pID, -1, str);
    format(str, sizeof str, "You made %s a helper.", name);
    SendClientMessage(playerid, -1, str);
    return 1;
}
__________________
LS-CNR
DerickClark is offline   Reply With Quote
Old 23/01/2013, 01:27 AM   #2
Infinity90
Gangsta
 
Infinity90's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 525
Reputation: 38
Default Re: Need help on Helpers

Have you even created a saving system?
__________________
Coding for money.
______________________________________________
You need to give respect to earn it.
______________________________________________
My Work
Dynamic Entrance System
EasyScript System
Infinity90 is offline   Reply With Quote
Old 23/01/2013, 01:29 AM   #3
DerickClark
High-roller
 
DerickClark's Avatar
 
Join Date: Jul 2012
Posts: 1,569
Reputation: 9
Default Re: Need help on Helpers

yea it comes with the gamemode
__________________
LS-CNR
DerickClark is offline   Reply With Quote
Old 23/01/2013, 01:55 AM   #4
Deviant96
Big Clucker
 
Join Date: May 2011
Location: Indonesia
Posts: 51
Reputation: 2
Default Re: Need help on Helpers

You must make a command for restarting your server (not rcon command, but you-made-command)
It went like this

Code:
COMMAND:rcongmx(playerid, params[])
{
    /* Place your saving function here 
    ex : INI_WriteBool(UserData, "Helper", playerHelper[pID]) <<-- for Y_INI, change to your setting */
    SendRconCommand("gmx");
    return 1;
}
__________________
"Even Earth tells us to learn from anything. Human race learned the basic survival on this planet. We are here for help if anyway we can. SAMP Wiki its just a guide with few instructions. You will never get the Advance Pawno Scripting with it. And You're not making your ancestors proud of yourself , Respect The Learners mate and the same goes for everyone." - Ballu Miaa
Deviant96 is offline   Reply With Quote
Old 23/01/2013, 02:01 AM   #5
DerickClark
High-roller
 
DerickClark's Avatar
 
Join Date: Jul 2012
Posts: 1,569
Reputation: 9
Default Re: Need help on Helpers

Y_INI is ysi
__________________
LS-CNR

Last edited by DerickClark; 23/01/2013 at 03:11 AM.
DerickClark is offline   Reply With Quote
Reply

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
Helpers Alex0 Scripting Help 3 23/12/2012 08:25 PM
Helpers Corona Scripting Help 1 25/06/2012 11:17 PM
Looking for a few helpers Kontrol Scripting Help 0 09/04/2012 10:43 PM
Need help + rep to helpers Anthony_X Server Support 30 05/01/2012 12:31 PM


All times are GMT. The time now is 04:01 AM.


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