Define/stock question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Define/stock question (
/showthread.php?tid=656404)
Define/stock question -
IdonTmiss - 15.07.2018
Well should i use , is it just the same or am i stupid?
pawn Code:
stock Error(playerid, string[]) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: {FFFFFF}%s", string);
//
//Then for a command
if(PlayerInfo[pAdmin] < 1) return Error(playerid, "U can't use this command!");
//or just like this
if(PlayerInfo[pAdmin] < 1) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");
Re: Define/stock question -
IdonTmiss - 15.07.2018
Quote:
Originally Posted by ******
Neither, this function doesn't need to be stock.
|
So just use this for commands and returns in them?
pawn Code:
va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");
Re: Define/stock question -
IdonTmiss - 15.07.2018
Quote:
Originally Posted by ******
I'd suggest you spell "you" correctly, but otherwise yes. However, that's not quite what I meant - the `Error` function doesn't need `stock` before it.
|
I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks !
Re: Define/stock question -
GhostHacker9 - 15.07.2018
Quote:
Originally Posted by ******
I'd suggest you spell "you" correctly
|
I'd suggest you spell "why" correctly
Re: Define/stock question -
Garr - 15.07.2018
Quote:
Originally Posted by IdonTmiss
I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks ! 
|
He's saying you don't need to use the stock keyword. Just create a regular function lol.