16.05.2010, 07:59
Como й que posso rondar as skins do player ao fazer /paisana tipo SetPlayerSkin(playerid,(skin));
new Skins [] =
{
2,
290,
291,
292,
299
};
if(strcmp(cmdtext, "/paisana", true) == 0)
{
new Skins = random(sizeof(Skins));
SetPlayerSkin(playerid,Skins[Skins]);
}
C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5512) : warning 219: local variable "Skins" shadows a variable at a preceding level C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 028: invalid subscript (not an array or too many subscripts): "Skins" C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 001: expected token: ";", but found "]" C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : fatal error 107: too many error messages on one line
new Skins = random(sizeof(Skins));//5512 SetPlayerSkin(Skins[Skins]);//5513
Originally Posted by tshadow
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5512) : warning 219: local variable "Skins" shadows a variable at a preceding level C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 028: invalid subscript (not an array or too many subscripts): "Skins" C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 001: expected token: ";", but found "]" C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\server\Server\gamemodes\BCRP.pwn(5513) : fatal error 107: too many error messages on one line Код:
new Skins = random(sizeof(Skins));//5512 SetPlayerSkin(Skins[Skins]);//5513 |
new Skins = random(sizeof(Skins));//5512
SetPlayerSkin(playerid,Skins[Skins]);//5513