19.06.2011, 03:21
PHP код:
if(strcmp(cmd, "/armas", true) == 0)
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Vocк estб offline");
new j_[MAX_PLAYER_NAME]; j_ = strtok(cmdtext, idx);
if(!strlen(j_)) return SendClientMessage(playerid, -1, "/armas [1-2-3]");
if(strcmp(j_,"1",true) == 0) {
//faзa o que vocк quiser aqui...
}
else if(strcmp(j_,"2",true) == 0) {
//faзa o que vocк quiser aqui...
}
else if(strcmp(j_,"3",true) == 0) {
//faзa o que vocк quiser aqui...
}
else return SendClientMessage(playerid, -1, "Ultilize de 1 a 3.");
return 0x01;
}
if(strcmp(cmd, "/armas", true) == 0) {
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Vocк estб offline");
tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, -1, "/armas [1-2-3]");
new armaid = strval(tmp);
if(armaid < 1 || armaid > 3) return SendClientMessage(playerid, -1, "Use: /armaid 1-3");
if(armaid == 1 && IsPlayerInRangeOfPoint(playerid, 15.0, X,Y,Z) ) return SendClientMessage(playerid, -1, "Kit 1 de armas.");
else if(armaid == 2 && IsPlayerInRangeOfPoint(playerid, 15.0, X,Y,Z) ) return SendClientMessage(playerid, -1, "Kit 1 de armas.");
else if(armaid == 3 && IsPlayerInRangeOfPoint(playerid, 15.0, X,Y,Z) ) return SendClientMessage(playerid, -1, "Kit 1 de armas.");
return 0x01;
}