Jump to content
  • 0

pomoc Náhodný CP


Emmyson172

Dotaz

4 odpovědí na tuto otázku

Recommended Posts

  • 0


new r = random(5);
switch(r)
{
case 0: SetPlayerChe...
case 1: SetPlayerChe...
case 2: SetPlayerChe...
case 3: SetPlayerChe...
case 4: SetPlayerChe...
}

 

Edited by Hrb™
Link to comment
Share on other sites

  • 0

a nebo 

 

new Float: nahodnycp[][4] ={

  { x,y,z},
 { x,y,z},
 { x,y,z},
 { x,y,z}
 };
case 1:
{   new rand = random(sizeof(nahodnycp));
   SetPlayerCheckpoint(playerid,nahodnycp[rand][0],nyhodnycp[rand][1],nahodnycp[rand][2],nahodnycp[rand][3]);
}
Link to comment
Share on other sites

  • 0
C:\Users\Maroš\Desktop\TZ.pwn(266) : error 003: declaration of a local variable must appear in a compound block

C:\Users\Maroš\Desktop\TZ.pwn(266) : error 017: undefined symbol "r"

C:\Users\Maroš\Desktop\TZ.pwn(267) : error 017: undefined symbol "r"

 

 

266 new r = random(2);

267 switch®

Edited by Emmyson172
Link to comment
Share on other sites

  • 0

Stačí, keď použiješ toto:

switch(random(5))
{
    case 0: SetPlayerChe...
    case 1: SetPlayerChe...
    case 2: SetPlayerChe...
    case 3: SetPlayerChe...
    case 4: SetPlayerChe...
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...