Stock Function
#2

If you want sth like GetPlayerName, do it like this:

Код:
stock GetMission(mission[], len) 
{ 
    switch(curMission) 
    { 
        case 0: format(mission, len, "Minigun Madness"); 
    } 
    return 1; 
}
But if you want the direct string, you can do this:

PHP код:
stock GetCurMission() {
    new 
string[32];
    switch(
curMission) {
        case 
0string "Minigun Madness";
    }
    return 
string;
}
//and then:
printf("Current Mission: %s",GetCurMission()); 
Greekz
Reply


Messages In This Thread
Stock Function - by JaKe Elite - 18.03.2015, 11:40
AW: Stock Function - by Kaliber - 18.03.2015, 11:47
Re: Stock Function - by JaKe Elite - 18.03.2015, 11:49

Forum Jump:


Users browsing this thread: 2 Guest(s)