26.09.2009, 23:17
i want to make a Command that only work when the player have 1 Score but here is my Verion but false
However, there are no errors in the script as a player with one-game score 0 the command nothing happens, even if you have: 1 Score nothing happens.
I want it but have so that if the message is missing: 1 Score.
If a score as the command will simply happen and it will be ported, etc.
Help what is wrong??
Quick help needed!
Quote:
public OnPlayerPickUpPickup(playerid, pickupid) { if(ParkourCP[playerid] == -1) return 1; if(ParkourPickups[ParkourCP[playerid]] == pickupid) { ParkourCP[playerid]++; if(ParkourCP[playerid] == sizeof(ParkourCheckpoints)) { ParkourCP[playerid] = -1; SetPlayerScore(playerid,GetPlayerScore(playerid) +1); // here you become a scorepoint SendClientMessage(playerid, 0xFACBADFF, "Youre finished the first parkour."); SendClientMessage(playerid, 0xFACBADFF, "You get 1 score. (/score)"); SendClientMessage(playerid, 0xFACBADFF, "Use `/parkour2` to start with the next."); RemovePlayerMapIcon(playerid, MAP_ICON_ID); } else { new string[12]; format(string, 12, "~b~CP:~w~%i", ParkourCP[playerid]); GameTextForPlayer(playerid, string, 3000, 5); SetPlayerMapIcon(playerid, MAP_ICON_ID, ParkourCheckpoints[ParkourCP[playerid]][0], ParkourCheckpoints[ParkourCP[playerid]][1], ParkourCheckpoints[ParkourCP[playerid]][2], 53, 0); } } return 1; } |
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { if(GetPlayerScore(playerid) >= 1) // if have a score then make command, when not a score then block the command and send a warning { if(strcmp(cmdtext, "/parkour2", true) == 0) { ParkourCP[playerid] = 0; SetPlayerMapIcon(playerid, MAP_ICON_ID, ParkourCheckpoints[0][0], ParkourCheckpoints[0][1], ParkourCheckpoints[0][2], 53, 0); SetPlayerPos(playerid, 1847.0726,-1593.7416,15.4674); SetPlayerFacingAngle(playerid, 175.9439); SetCameraBehindPlayer(playerid); SetPlayerHealth(playerid, 97.6); return 1; } else { SendClientMessage(playerid,rot,"You must complete parkour 1. (/start)"); //message when you not have a scorepoint } return 1; } return 1; } |
I want it but have so that if the message is missing: 1 Score.
If a score as the command will simply happen and it will be ported, etc.
Help what is wrong??
Quick help needed!