21.07.2012, 00:35
Today I learned that the bone structure of skin Id 267 Officer Jimmy Hernandez Is fucked up.
9 / 4 // This will give you 2
9 % 4 // This will give you 1
new Float:vec[3]; GetPlayerPos(playerid,vec[0],vec[1],vec[2]);
new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid,X,Y,Z);
forward public SomeFunction();
SomeFunction(){}
stock KillPlayer(playerid)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
forward [128] getMessage(playerid); stock getMessage(playerid) { #pragma unused playerid new msg[128]; return msg; }
forward [128][1][2] getInfo(); stock getInfo() { new info[128][1][2]; info[0][0][1] = 1; return info; }
native [128] getClientMessage(playerid);
stock CreateVehicleSpawn(someArray[], someArray_size = sizeof(someArray))
{
// blah
}
stock CreateVehicleSpawn(someArray[])
{
printf("Array size: %i", sizeof(someArray));
}
if (strcmp("/lv", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, 2002.1925,1543.9114,13.5859); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa3333a, "Welcome to Las Venturas."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/lvair", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, 1592.0784,1171.6952,14.2241); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa3333a, "Welcome to Las Venturas Airport."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/sfair", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, -1161.7926,33.5112,14.1484); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa33331, "Welcome to San Fierro Airport."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/home", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, -49.6428,-270.6409,6.6332); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa33331, "Welcome to Home. The place you spawned."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } return 0; |
new stock const static variable; new stock const public variable; new stock const const static variable; // error, 'const' class-specifier defined twice for one declarator.
native func() = -0;
sysreq.c 0
native func() = 11; // error
native func() = -123;
if(defined symbol) {} if(defined(symbol)) {} new const symbol_exists = defined(symbol);
Today I learned that using static to initialize variable inside a loop is much more efficient than using new.
|
new static variable;
static variable;
#define pattern substitution #define prefix<non-alphabetic substitution #define prefix{non-alphabetic warning 201 issued
#define _X%1 whatever
#define _X whatever