GET PLAYER SCORE!!!! PLZ HELP EMERGENCY!!!
#1

PLZ HELP ME HOW TO MAKE THIS FUNCTION
Код:
GetPlayerscore playerid < 30
if player have 30 score then setplayerpos x y z
else if u dont have
Reply
#2

pawn Код:
if(GetPlayerScore(playerid) < 30)
{
    SetPlayerPos(playerid, x, y, z);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
}
I believe that's what you're looking for. You don't need to add an else statement because the return 1; will prevent other players that already have 30 score or more from being teleported.
Reply
#3

1. It isn't an emergency, you could of tried. it's pretty simple
2.
pawn Код:
if(GetPlayerScore(playerid) < 30)
{
    SetPlayerPos(playerid,x,y,z)//your coords
    return 1;
}
Might work , I'm not definite.
EDIT: Above poster
Reply
#4

edit: some people were before me xD

pawn Код:
if(GetPlayerScore(playerid) < 30) return SetPlayerPos(playerid, X, Y, Z);
    SendClientMessage(playerid, color, "You don't have 30 score points yet.");
Reply
#5

I suggest you search on the wiki next time, it's not hard.

https://sampwiki.blast.hk/wiki/Control_Structures#if
Reply
#6

i want to use it for A DIALOG MENU when player click on first option then if he have 30 then set his pos plz give me code for cases like
PLZZZZ CHECK THIS AND ADD HERE COZ MY MIND IS HEAT IN CASE MAKING MAPS SO PLZ HELP
Quote:

if(dialogid == 1)
{
switch(listitem) {
case 0:
{
SetPlayerPos(playerid,3456.1189,151.0336,3.1196);
}
case 1:
{
SetPlayerPos(playerid,-45.8298,3294.0808,4.1612);
}
case 2:
{
SetPlayerPos(playerid,2030.2235,-2447.2937,13.9739);

}
case 3:
{
SetPlayerPos(playerid,2030.2235,-2447.2937,13.9739);
}

Reply
#7

plz any one help how i can use this in cases like this getplayerstats oldstats and etc and then use it in cases plzzzzzzz (
Reply
#8

Quote:
Originally Posted by Iphone1234g
Посмотреть сообщение
plz any one help how i can use this in cases like this getplayerstats oldstats and etc and then use it in cases plzzzzzzz (
Read https://sampforum.blast.hk/showthread.php?tid=45235 plzzzzzzzzz (
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)