using variables as playerid?
#1

for examply i have variable at top of script:

new retard;


now can i use the value of that variable in this:

SetPlayerArmour(retard, 100); instead of SetPlayerArmour(playerid, 100);
Reply
#2

pawn Код:
new retard;
public OnPlayerSpawn(playerid)
{
    retard = playerid;
    SetPlayerArmour(retard, 100);
    return 1;
}
Reply
#3

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
new retard;
public OnPlayerSpawn(playerid)
{
    retard = playerid;
    SetPlayerArmour(retard, 100);
    return 1;
}
will check it, if it works then i'll +rep ya :P
Reply
#4

You can use
Код:
Public OnPlayerSpawn(playerid)
{
    SetPlayerArmor(playerid, 100)
    return 1;
}
What is retard for lol?
Reply
#5

Quote:
Originally Posted by PMH
Посмотреть сообщение
will check it, if it works then i'll +rep ya :P
It works. I guarantee. It's the most useless piece of code ever written, however.
Reply
#6

i put retard as variable just for fun, but this is still not working for me. don't know if this is the exact problem in my script or something else
Reply
#7

You might have "retard" as a global variable defined in your script. search for "new retard" in your script.
Reply
#8

Why would you want to do that, unless your forwarding information past a function which isn't capable of holding that information.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)