Originally Posted by иєσz
Search for debug.
|
Originally Posted by Weirdosport
KennethHoegh if you're new to scripting, this is kinda throwing yourself in the deep end. Start with some simple commands that give back non variable responses, and work your way up.
eg. /car - gives you an Infernus as opposed to: /car ID - considerably more complicated for a beginner. |
Originally Posted by KennethHoegh
Sure - But im also looking for someone to teach me the "basic" commands (as you sar /car gives you an Infernus.) But i cant find any. :/
|
if (!strcmp (cmdtext,"/infernus", true))
{
if(IsPlayerAdmin(playerid)) //Is the player rcon admin?
{
if(!IsPlayerInAnyVehicle(playerid) //the "!" means that if "IsPlayerInVehicle" returns false, the code will execute, if not, the return code will.
{
//car spawn code, ironicly this is the only thing i don't know :D lol :< maybe someone else can fill it in
}
return SendClientMessage(playerid,0xFF0000FF,"You are already in a vehicle!"); //If the player already is in a vehicle, this will happen
}
return SendClientMessage(playerid,0xFF0000FF,"Access denied!"); //If the player wasn't logged in to rcon, this happens.
}
if (!strcmp (cmdtext,"/infernus", true))
{
if(IsPlayerAdmin(playerid)) //Is the player rcon admin?
{
if(!IsPlayerInAnyVehicle(playerid) //the "!" means that if "IsPlayerInVehicle" returns false, the code will execute, if not, the return code will.
{
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
GetPlayerFacingAngle(playerid, Float:Angle);
CreateVehicle(411, X, Y, Z + 2.0, Angle + 90.0, -1, -1, 5000);
}
return SendClientMessage(playerid,0xFF0000FF,"You are already in a vehicle!"); //If the player already is in a vehicle, this will happen
}
return SendClientMessage(playerid,0xFF0000FF,"Access denied!"); //If the player wasn't logged in to rcon, this happens.
}