Random spawn?Help
#1

i need someon can make/give a code, this code do that:

whene a player need spawn he can't show skins, but whene he clics on "Spawn" he random Skin(the system shose a skin for he)

Please Help
Reply
#2

Try this:
pawn Код:
#define MAX_RANDOM_SKINS 10
new s_randon_skins[MAX_RANDOM_SKINS] = {23, 112, 36, 110, 206};
pawn Код:
public OnPlayerSpawn(playerid) {
    SetPlayerSkin(playerid, s_randon_skins[random(MAX_RANDOM_SKINS)]);
    return 1;
}
Reply
#3

so random skin and random spawn?
Reply
#4

Код:
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(109) : error 021: symbol already defined: "OnPlayerSpawn"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "s_randon_skins"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "MAX_RANDOM_SKINS"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#5

Quote:
Originally Posted by ServerScripter
Посмотреть сообщение
Код:
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(109) : error 021: symbol already defined: "OnPlayerSpawn"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "s_randon_skins"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "MAX_RANDOM_SKINS"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
You already have OnPlayerSpawn, just put this code inside it.
pawn Код:
SetPlayerSkin(playerid, s_randon_skins[random(MAX_RANDOM_SKINS)]);
Reply
#6

Quote:
Originally Posted by ServerScripter
Посмотреть сообщение
Код:
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(109) : error 021: symbol already defined: "OnPlayerSpawn"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "s_randon_skins"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 017: undefined symbol "MAX_RANDOM_SKINS"
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PC\Bureau\RE-Games\GAMEMO~1\RE-GAMES.pwn(110) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
PHP код:
#define MAX_RANDOM_SKINS 10
new s_randon_skins[MAX_RANDOM_SKINS] = {2311236110206}; 
At the top of teh script, under #include <a_samp>
PHP код:
SetPlayerSkin(playerids_randon_skins[random(MAX_RANDOM_SKINS)]); 
UNder call back OnPlayeSpawn that already exsists in script.
Reply
#7

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
so random skin and random spawn?
euuh IDK xD, but i need the system choose a skin for a player whene he spawns ^^
Reply
#8

Quote:
Originally Posted by ServerScripter
Посмотреть сообщение
euuh IDK xD, but i need the system choose a skin for a player whene he spawns ^^
You want it to randomaly choose or a player chooses? I don't get you.
Reply
#9

it working so: 23, 112, 36, 110, 206 are the rondom skins?i can add more?
Код:
new s_randon_skins[MAX_RANDOM_SKINS] = {23, 112, 36, 110, 206};
Reply
#10

Quote:
Originally Posted by EliranPesahov
Посмотреть сообщение
You want it to randomaly choose or a player chooses? I don't get you.
no i don't won player choose i want rondom choose(system choose a automatically skin for the player whene he spawns)^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)