How to make Case 2?
#1

Hi everyone How to I can make Case 2? For onplayerentercheckpoint??

Can you help me?

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only For SWAT, you are not SWAT");
	GivePlayerWeapon(playerid, 24, 65);
	GivePlayerWeapon(playerid, 26, 150);
	GivePlayerWeapon(playerid, 31, 150);
	GivePlayerWeapon(playerid, 34, 50);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, -1, "{FF0000}You have been Refill Come Back After you Dead");
	case 2:
	if(GetPlayerSkin(playerid) != 287) return SendClientMessage(playerid, -1, "{FF0000}Sorry This Place only for Army Refiled, You are not Army");
	GivePlayerWeapon(playerid, 30, 100);
	GivePlayerWeapon(playerid, 27, 65);
	GivePlayerWeapon(playerid, 33, 35);
	GivePlayerWeapon(playerid, 16, 3);
	GivePlayerWeapon(playerid, 24, 65);
	return 1;
}
Reply
#2

You have to switch something to use case (So called switch case), what are you switching.
Reply
#3

I'll advice you to use Dynamic checkpoints

Create each checkpoint for specific classes. and you wont need cases,although you could uses cases Switch(checkpointid)
PHP код:
Example CreateDynamicCP(Float:xFloat:yFloat:zFloat:sizeworldid = -1interiorid = -1playerid = -1Float:distance 100.0);
public 
OnPlayerEnterDynamicCP(playeridcheckpointid){
     if(
checkpointid == Example) {
     if(
GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only For SWAT, you are not SWAT");
     
GivePlayerWeapon(playerid2465);
     
GivePlayerWeapon(playerid26150);
     
GivePlayerWeapon(playerid31150);
     
GivePlayerWeapon(playerid3450);
     
SetPlayerArmour(playerid100);
     
SetPlayerHealth(playerid100);
     
SendClientMessage(playerid, -1"{FF0000}You have been Refill Come Back After you Dead");
     }
   }
 } 
Reply
#4

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
I'll advice you to use Dynamic checkpoints

Create each checkpoint for specific classes. and you wont need cases
PHP код:
Example CreateDynamicCP(Float:xFloat:yFloat:zFloat:sizeworldid = -1interiorid = -1playerid = -1Float:distance 100.0);
public 
OnPlayerEnterDynamicCP(playeridcheckpointid){
     if(
checkpointid == Example) {
     if(
GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only For SWAT, you are not SWAT");
     
GivePlayerWeapon(playerid2465);
     
GivePlayerWeapon(playerid26150);
     
GivePlayerWeapon(playerid31150);
     
GivePlayerWeapon(playerid3450);
     
SetPlayerArmour(playerid100);
     
SetPlayerHealth(playerid100);
     
SendClientMessage(playerid, -1"{FF0000}You have been Refill Come Back After you Dead");
     }
   }
 } 
Hi Dear

This Code Should be OnPlayerSpawn?

Код:
Example*=*CreateDynamicCP(Float:x,*Float:y,*Float:z,*Float:size,*worldid*=*-1,*interiorid*=*-1,*playerid*=*-1,*Float:distance*=*100.0);
Reply
#5

OnGameModeInit()
Reply
#6

What's Wrong Here

Код:
Refil*=*CreateDynamicCP(1332.2339,1254.7034,10.8203,*3.0,-1,-1,-1,100.0);
Reply
#7

help
Reply
#8

Show us the errors?
Reply
#9

Codes for errors?
Reply
#10

Why you puttin **? lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)