A little bit of help here please - 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: A little bit of help here please (
/showthread.php?tid=336843)
A little bit of help here please -
Scripter12345 - 23.04.2012
I am trying to make it so when you do /setadminskin <SKINIDHERE> what you put there your skin would chance to for your permanant admin skin and message to pop up saying you have done it
pawn Код:
CMD:setadminskin(playerid, params[])
{
if(PlayerData[ID][AdminLevel] >= 1)
{
new string[128], newskin[3];
if(sscanf(params, "sk", newskin)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE: /setadminskin <skinid>");
format(PlayerData[playerid][AdminSkin],"%s",newskin);
format(string, sizeof(string), "You set your admin skin to %s", newskin);
SendClientMessage(playerid, 0xFFFFFFF, string);
}
return 1;
}
Im getting this error
pawn Код:
error 035: argument type mismatch (argument 2)
Line 488 : format(PlayerData[playerid][AdminSkin],"%s",newskin);
Thank You
Please Help Me Please
Re: A little bit of help here please -
Scripter12345 - 23.04.2012
Please Help Me
Please Help Me Please
Re: A little bit of help here please -
ViniBorn - 24.04.2012
AdminSkin is integer, isn't?
Re: A little bit of help here please -
[KHK]Khalid - 24.04.2012
pawn Код:
format(PlayerData[playerid][AdminSkin],"%s",newskin);
I guess you ate the Length parameter
https://sampwiki.blast.hk/wiki/Format
Re: A little bit of help here please -
Ballu Miaa - 24.04.2012
Fuck that CMD. This one here is fixed. Use this.
pawn Код:
CMD:setadminskin(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] >= 1)
{
new string[35], newskin;
if(sscanf(params, "d", newskin)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE: /setadminskin <skinid>");
PlayerData[playerid][AdminSkin] = newskin;
format(string, sizeof(string), "You set your admin skin to %d", newskin);
SendClientMessage(playerid, 0xFFFFFFF, string);
}
return 1;
}