Commands -
Swc20 - 16.02.2012
Hi,
How can I make commands for specific "skins" example just only policeman or guards can use a specific command?
Re: Commands - T0pAz - 16.02.2012
Use
GetPlayerSkin and check if he is wearing a
police skin or not.
Links:
------
GetPlayerSkin - Wiki
Skin List - Wiki
Re: Commands -
Swc20 - 16.02.2012
Quote:
Originally Posted by T0pAz
|
Thanks, But I'm still beginner. So could you paste a example code. I know only how to add commands but not for specified skin. :P
Re: Commands -
Mark™ - 16.02.2012
Quote:
Originally Posted by Swc20
Thanks, But I'm still beginner. So could you paste a example code. I know only how to add commands but not for specified skin. :P
|
pawn Код:
playerskin = GetPlayerSkin(playerid);
taken from wiki
Re: Commands -
MinazAhmed - 16.02.2012
Check samp wiki main page for any help you need they will provide you with all help.
if i ever helped u please + rep becuz i need to advertise my server.
Re: Commands -
Swc20 - 16.02.2012
Quote:
Originally Posted by Xtreme_playa
pawn Код:
playerskin = GetPlayerSkin(playerid);
taken from wiki
|
I need help with another thing. I get this error:
pawn Код:
: warning 217: loose indentation
when i wirte:
pawn Код:
public OnPlayerSpawn(playerid)
{
playerskin = GetPlayerSkin(playerid);
if(playerskin == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 4");
}
if(playerskin == 2)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 2");
}
if(playerskin == 3)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 3");
}
if(playerskin == 4)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 4");
}
if(playerskin == 5)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 5");
}
if(playerskin == 6)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 6");
}
return 1;
}
Re: Commands -
Konstantinos - 16.02.2012
pawn Код:
public OnPlayerSpawn(playerid)
{
playerskin = GetPlayerSkin(playerid);
if(playerskin == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 4");
}
if(playerskin == 2)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 2");
}
if(playerskin == 3)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 3");
}
if(playerskin == 4)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 4");
}
if(playerskin == 5)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 5");
}
if(playerskin == 6)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin ID 6");
}
return 1;
}
Re: Commands -
Swc20 - 16.02.2012
Nothing
Re: Commands -
Konstantinos - 16.02.2012
pawn Код:
playerskin = GetPlayerSkin( playerid );
if( playerskin >= 5 || playerskin <= 7 )
{
// The skin is 5 or 6 or 7
}
Also with cases:
pawn Код:
playerskin = GetPlayerSkin( playerid );
switch( playerskin )
{
case 5 .. 7: //the skins are from 5 to 7 (5, 6, 7)
}
Or if it's like 5, 6, 8 then you have to use it
pawn Код:
playerskin = GetPlayerSkin( playerid );
if( playerskin == 5 || playerskin == 6 || playerskin == 8 )
{
// The skin is 5 or 6 or 8
}
But you can use also cases.
pawn Код:
playerskin = GetPlayerSkin( playerid );
switch( playerskin )
{
case 5, 6, 8: // the skin is 5 or 6 or 8
}
Edit: Erm.. You asked me and then edited the post to
Quote:
Originally Posted by Swc20
Nothing
|
Re: Commands -
Swc20 - 16.02.2012
Quote:
Originally Posted by Dwane
pawn Код:
playerskin = GetPlayerSkin( playerid ); if( playerskin >= 5 || playerskin <= 7 ) { // The skin is 5 or 6 or 7 }
Also with cases:
pawn Код:
playerskin = GetPlayerSkin( playerid ); switch( playerskin ) { case 5 .. 7: //the skins are from 5 to 7 (5, 6, 7) }
Or if it's like 5, 6, 8 then you have to use it
pawn Код:
playerskin = GetPlayerSkin( playerid ); if( playerskin == 5 || playerskin == 6 || playerskin == 8 ) { // The skin is 5 or 6 or 8 }
But you can use also cases.
pawn Код:
playerskin = GetPlayerSkin( playerid ); switch( playerskin ) { case 5, 6, 8: // the skin is 5 or 6 or 8 }
Edit: Erm.. You asked me and then edited the post to
|
How to make random camera positions, I mean that the camera changes view every 2 second and after 3 views it goes to player skin selection?