[HELP] /oskin command.
#1

Hello! I need some help with my /oskin cmd. I have made on but with this can i only get one skin. How can i make it so i can get 2 skins byt typing /oskin 2 times? And how can i add a new org with other skin with the same cmd again? If you understand. I got this oskin command.

Код:
CMD:oskin(playerid, params[])
{
if (PlayerOrg[playerid] != GetOrgID("San Andreas Police Department")) return 0;
SetPlayerColor(playerid, 0x007FFF00);
SetPlayerSkin(playerid, 280);
GivePlayerWeapon(playerid, 24,1000);
GivePlayerWeapon(playerid, 5,1);
//GivePlayerWeapon(playerid, shotgun, 25);
return 1;
}
Reply
#2

two skins? u only can have one skin O.O
u want 2 skins together?
Reply
#3

i mean first time type /oskin you get on skin and next time will you get a new skin
Reply
#4

You would need to make it loop through all the police skins and select a random one.
Reply
#5

I only want two police skins.

Like if you are in SAPD and types /oskin first time you get skin id 280 and next time you types it you get skin id 283, but if you are in GSF will you not get the cop skins you will get ID 19 and next time you get skin ID 25 (idk the id's just to explaiin)
Reply
#6

Use this command

pawn Код:
CMD:oskin(playerid, params[])
{
if (PlayerOrg[playerid] == 0) return SendClientMessage(playerid, COLOR_RED,"You are not a member of an organization");
{
if (PlayerOrg[playerid] == 1)
{
if(GetPlayerSkin(playerid) != 105)
{
SetPlayerSkin(playerid,105);
SetPlayerColor(playerid,COLOR_DARKGREEN);
GivePlayerWeapon(playerid,25,60000);
GivePlayerWeapon(playerid,28,20000);
GivePlayerWeapon(playerid,30,20000);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_DARKGREEN,"You have changed to your First organization skin!");
return 1;
}
if(GetPlayerSkin(playerid) == 105)
{
SetPlayerSkin(playerid,106);
SetPlayerColor(playerid,COLOR_DARKGREEN);
SendClientMessage(playerid,COLOR_DARKGREEN,"You have changed to your Second organization skin!");
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid,25,60000);
GivePlayerWeapon(playerid,32,20000);
GivePlayerWeapon(playerid,30,20000);
return 1;
}
}
if (PlayerOrg[playerid] == 2)
{
if(GetPlayerSkin(playerid) != 102)
{
SetPlayerSkin(playerid,102);
SetPlayerColor(playerid,COLOR_PURPLE);
SendClientMessage(playerid,COLOR_PURPLE,"You have changed to your First organization skin!");
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid,35,60000);
GivePlayerWeapon(playerid,28,10000);
GivePlayerWeapon(playerid,30,20000);
return 1;
}
if(GetPlayerSkin(playerid) == 102)
{
SetPlayerSkin(playerid,104);
SetPlayerColor(playerid,COLOR_PURPLE);
SendClientMessage(playerid,COLOR_PURPLE,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,35,60000);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid,28,10000);
GivePlayerWeapon(playerid,30,20000);
return 1;
}
}
if (PlayerOrg[playerid] == 3)
{
if(GetPlayerSkin(playerid) != 114)
{
SetPlayerSkin(playerid,114);
SetPlayerColor(playerid,COLOR_CYAN);
SendClientMessage(playerid,COLOR_CYAN,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,32,60000); //Rocket Launcher
GivePlayerWeapon(playerid,31,10000); //Sawn-off Shotgun
GivePlayerWeapon(playerid,25,20000); //AK-47
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 114)
{
SetPlayerSkin(playerid,116);
SetPlayerColor(playerid,COLOR_CYAN);
SendClientMessage(playerid,COLOR_CYAN,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,32,60000); //Rocket Launcher
GivePlayerWeapon(playerid,31,10000); //Sawn-off Shotgun
GivePlayerWeapon(playerid,25,20000); //AK-47
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 4)
{
if(GetPlayerSkin(playerid) != 111)
{
SetPlayerSkin(playerid,111);
SetPlayerColor(playerid,COLOR_GREENISHGOLD);
SendClientMessage(playerid,COLOR_GREENISHGOLD,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,30,60000); //Rocket Launcher
GivePlayerWeapon(playerid,28,10000); //Sawn-off Shotgun
GivePlayerWeapon(playerid,27,20000); //AK-47
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 111)
{
SetPlayerSkin(playerid,112);
SetPlayerColor(playerid,COLOR_GREENISHGOLD);
SendClientMessage(playerid,COLOR_GREENISHGOLD,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,30,60000); //Rocket Launcher
GivePlayerWeapon(playerid,28,10000); //Sawn-off Shotgun
GivePlayerWeapon(playerid,27,20000); //AK-47
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 5)
{
if(GetPlayerSkin(playerid) != 282)
{
SetPlayerSkin(playerid,282);
SetPlayerColor(playerid,COLOR_SASD);
SendClientMessage(playerid,COLOR_SASD,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,24,1000000);
GivePlayerWeapon(playerid,26,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 282)
{
SetPlayerSkin(playerid,283);
SetPlayerColor(playerid,COLOR_SASD);
SendClientMessage(playerid,COLOR_SASD,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,24,1000000);
GivePlayerWeapon(playerid,26,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 6)
{
if(GetPlayerSkin(playerid) != 247)
{
SetPlayerSkin(playerid,247);
SetPlayerColor(playerid,COLOR_RED);
SendClientMessage(playerid,COLOR_RED,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,25,1000000);
GivePlayerWeapon(playerid,28,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 247)
{
SetPlayerSkin(playerid,248);
SetPlayerColor(playerid,COLOR_RED);
SendClientMessage(playerid,COLOR_RED,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,25,1000000);
GivePlayerWeapon(playerid,28,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 7)
{
if(GetPlayerSkin(playerid) != 72)
{
SetPlayerSkin(playerid,72);
SetPlayerColor(playerid,COLOR_MEDIUMBLUE);
SendClientMessage(playerid,COLOR_MEDIUMBLUE,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,25,1000000);
GivePlayerWeapon(playerid,28,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 72)
{
SetPlayerSkin(playerid,73);
SetPlayerColor(playerid,COLOR_MEDIUMBLUE);
SendClientMessage(playerid,COLOR_MEDIUMBLUE,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,25,1000000);
GivePlayerWeapon(playerid,28,6000000);
GivePlayerWeapon(playerid,31,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 8)
{
if(GetPlayerSkin(playerid) != 287)
{
SetPlayerSkin(playerid,287);
SetPlayerColor(playerid,COLOR_YELLOWGREEN);
SendClientMessage(playerid,COLOR_YELLOWGREEN,"You have changed to your organization skin!");
GivePlayerWeapon(playerid,34,1000000);
GivePlayerWeapon(playerid,36,6000000);
GivePlayerWeapon(playerid,31,8000000);
GivePlayerWeapon(playerid,26,8000000);
GivePlayerWeapon(playerid,24,8000000);
GivePlayerWeapon(playerid,28,8000000);
GivePlayerWeapon(playerid,16,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
}
if (PlayerOrg[playerid] == 9)
{
if(GetPlayerSkin(playerid) != 118)
{
SetPlayerSkin(playerid,118);
SetPlayerColor(playerid,COLOR_ND);
SendClientMessage(playerid,COLOR_ND,"You have changed to your First organization skin!");
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,24,6000000);
GivePlayerWeapon(playerid,29,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
if(GetPlayerSkin(playerid) == 118)
{
SetPlayerSkin(playerid,120);
SetPlayerColor(playerid,COLOR_ND);
SendClientMessage(playerid,COLOR_ND,"You have changed to your Second organization skin!");
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,24,6000000);
GivePlayerWeapon(playerid,29,8000000);
SetPlayerArmour(playerid, 100);
return 1;
}
}
}
}
Reply
#7

Took you 5 months to script that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)