SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/05/2014, 08:07 AM   #11
NaClchemistryK
Huge Clucker
 
NaClchemistryK's Avatar
 
Join Date: Jun 2013
Posts: 260
Reputation: 6
Default Re: /saveskin & /delskin

your script should work, but I have a little advice for you.
Instead of making so many if and elses, you can return the client messages. That will make your script shorter.
example with /saveskin...
pawn Code:
CMD:saveskin(playerid,params[])
{
    new skinid = GetPlayerSkin(playerid);
    if(SkinSaving[playerid] == 1) return SendClientMessage(playerid,COLOR_GREY,"You already saved a skin before! to delete it you can use /delskin !");//this is what I am talking about. Simply return it to save some typing mayhem... Esecially in long scripts.
    else if(SkinSaving[playerid] == 0)
    {
    PlayerInfo[playerid][eSkin] = skinid;
    SkinSaving[playerid] = 1;
    SendClientMessage(playerid,COLOR_GREY,"You have saved your skin, Every time you spawn your skin will be %d",skinid);
    }
    return 1;
}
the same goes for /delskin.
And you haven't added the stuff Rittik said, skin id 74 is really a invalid skin id. You shold add it in your tut.
Otherwise great job.
NaClchemistryK is offline   Reply With Quote
Old 24/05/2014, 01:01 PM   #12
Ghazal
Huge Clucker
 
Ghazal's Avatar
 
Join Date: Oct 2013
Location: Egypt
Posts: 493
Reputation: 161
Default Re: /saveskin & /delskin

Quote:
Originally Posted by NaClchemistryK View Post
your script should work, but I have a little advice for you.
Instead of making so many if and elses, you can return the client messages. That will make your script shorter.
example with /saveskin...
pawn Code:
CMD:saveskin(playerid,params[])
{
    new skinid = GetPlayerSkin(playerid);
    if(SkinSaving[playerid] == 1) return SendClientMessage(playerid,COLOR_GREY,"You already saved a skin before! to delete it you can use /delskin !");//this is what I am talking about. Simply return it to save some typing mayhem... Esecially in long scripts.
    else if(SkinSaving[playerid] == 0)
    {
    PlayerInfo[playerid][eSkin] = skinid;
    SkinSaving[playerid] = 1;
    SendClientMessage(playerid,COLOR_GREY,"You have saved your skin, Every time you spawn your skin will be %d",skinid);
    }
    return 1;
}
the same goes for /delskin.
And you haven't added the stuff Rittik said, skin id 74 is really a invalid skin id. You shold add it in your tut.
Otherwise great job.
I will edit it on Tuesday when im back to home.
Anyways thanks.
Ghazal is offline   Reply With Quote
Old 26/05/2014, 09:51 PM   #13
Dangjai
Huge Clucker
 
Join Date: May 2014
Posts: 389
Reputation: 23
Default Re: /saveskin & /delskin

Thanks all it will be bump
Dangjai is offline   Reply With Quote
Old 27/05/2014, 08:49 AM   #14
Ghazal
Huge Clucker
 
Ghazal's Avatar
 
Join Date: Oct 2013
Location: Egypt
Posts: 493
Reputation: 161
Default Re: /saveskin & /delskin

Updated.
Ghazal 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
Need help with /saveskin. SevenSlash Scripting Help 5 05/01/2014 08:56 AM
/saveskin Blackazur Scripting Help 5 26/11/2012 03:30 PM
/saveskin Blackazur Scripting Help 1 28/10/2012 06:31 PM
/saveskin Blackazur Scripting Help 2 23/10/2012 08:00 PM
/saveskin problem Millionaire Help Archive 8 11/08/2011 02:34 PM


All times are GMT. The time now is 02:07 PM.


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